Bing Maps - UK Postcode to Map

What I am trying to do is to show a small generated bing card focused on uk zip through ajax API. I am sure it is possible; what I can’t find in the Bing Map documentation is how to convert the UK index into coordinates that I can connect to Ajax Control. Can someone point me in the right direction?

  function GetMap()
  {   

     var map = new Microsoft.Maps.Map(document.getElementById("mapDiv"), 
                       {credentials: "MyKeyHere",
                        center: new Microsoft.Maps.Location(45.5, -122.5),
                        mapTypeId: Microsoft.Maps.MapTypeId.road,
                        zoom: 7});
  }
+3
source share
1 answer

You can use the REST Locations Bing Maps service to geocode a zip code, and then create a map focused on the resulting coordinate location:

For example, to geocode the postcode "NR2 4TE": http://dev.virtualearth.net/REST/v1/Locations/UK/NR24TE?key=YourBingMapsKey

"", , , .

+3

Source: https://habr.com/ru/post/1794396/


All Articles