I am trying to use bing map to search location city and zip codes
for Denmark(DK)
.
But some times it is not working property. I have tried using the following code with SDK:
var map = new Microsoft.Maps.Map(document.getElementById('myMap'), {
credentials: 'Your Bing Maps Key',
});
var geoDataRequestOptions = { entityType: 'PopulatedPlace' };
Microsoft.Maps.loadModule('Microsoft.Maps.Search', function () {
var searchManager = new Microsoft.Maps.Search.SearchManager(map);
var requestOptions = new Microsoft.Maps.Search.GeocodeRequestOptions();
requestOptions.bounds = map.getBounds();
requestOptions.where = "1011 København K, DK";
requestOptions.callback = function (answer, userData) {
map.setView({ bounds: answer.results[0].bestView });
};
searchManager.geocode(requestOptions);
});
I also tried to search "1011 København K, DK
" with bing map on https://www.bing.com/ its not working perfactly for me.., where as some times it working fine that is if i have search "1052 København K, DK
" or "København K, DK
" it will be fine please help me for the same issue..