{"action":"opened","issue":{"url":"https://api.github.com/repos/Microsoft/Bing-Maps-V8-TypeScript-Definitions/issues/6","repository_url":"https://api.github.com/repos/Microsoft/Bing-Maps-V8-TypeScript-Definitions","labels_url":"https://api.github.com/repos/Microsoft/Bing-Maps-V8-TypeScript-Definitions/issues/6/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/Bing-Maps-V8-TypeScript-Definitions/issues/6/comments","events_url":"https://api.github.com/repos/Microsoft/Bing-Maps-V8-TypeScript-Definitions/issues/6/events","html_url":"https://github.com/Microsoft/Bing-Maps-V8-TypeScript-Definitions/issues/6","id":175698316,"number":6,"title":"Typings issue with geocoding request callback","user":{"login":"Lumilele","id":210922,"avatar_url":"https://avatars.githubusercontent.com/u/210922?v=3","gravatar_id":"","url":"https://api.github.com/users/Lumilele","html_url":"https://github.com/Lumilele","followers_url":"https://api.github.com/users/Lumilele/followers","following_url":"https://api.github.com/users/Lumilele/following{/other_user}","gists_url":"https://api.github.com/users/Lumilele/gists{/gist_id}","starred_url":"https://api.github.com/users/Lumilele/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lumilele/subscriptions","organizations_url":"https://api.github.com/users/Lumilele/orgs","repos_url":"https://api.github.com/users/Lumilele/repos","events_url":"https://api.github.com/users/Lumilele/events{/privacy}","received_events_url":"https://api.github.com/users/Lumilele/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-08T08:49:08Z","updated_at":"2016-09-08T08:49:08Z","closed_at":null,"body":"Hi,\r\n\r\nI have a problem with typings when I use the geocoding callback types.\r\n\r\n        var mapControl = new Microsoft.Maps.Map(document.getElementById('bingMapContainer'), {\r\n            credentials: 'some_key'\r\n        });\r\n\r\n        Microsoft.Maps.loadModule('Microsoft.Maps.Search', () => {\r\n            var searchManager = new Microsoft.Maps.Search.SearchManager(mapControl);\r\n            searchManager.geocode({\r\n                bounds: mapControl.getBounds(),\r\n                where: 'somewhere',\r\n                callback: (answer, userData) => {\r\n                    mapControl.setView({ bounds: answer.results[0].bestView });\r\n                    mapControl.entities.push(new Microsoft.Maps.Pushpin(answer.results[0].location));\r\n                }\r\n            });\r\n        });`\r\n\r\nThe IPlaceResult interface doesn't match what the Pushpin constructor is waiting for.\r\nI have to replace the above code by this one to handle this.\r\n\r\n`mapControl.entities.push(new Microsoft.Maps.Pushpin(answer.results[0].location as any));`\r\n"}}
{"actor":{"display_login":"Lumilele"}}