locked
REST api bounding box doesn't make sense to me RRS feed

  • Question

  • I would like to acquire two map images which assembled cover the area of Africa. These are my URLs:

    http://dev.virtualearth.net/REST/v1/Imagery/Map/AerialWithLabels/?mapArea=-45,0,0,45&mapSize=512,512&format=jpeg&key=MYKEY

    http://dev.virtualearth.net/REST/v1/Imagery/Map/AerialWithLabels/?mapArea=0,0,45,45&mapSize=512,512&format=jpeg&key=MYKEY

    as you can see, the only thing that changes is the mapArea. To my understanding, these two images should match on the edge, because they both have an edge at the equator. Unfortunately they don't (equatorial countries like Gabon aren't included on any of the maps). Am I missing something here?

    Friday, October 19, 2012 3:08 PM

Answers

  • The map area property will use the bounding box information you provided to determine the best zoom level and center point so that your bounding box will be within the view of the map. Because of this the actual bounding box of the image will more often than not be different from the map area you provided as the map uses integer zoom levels. If you want to line up the edges of two images you will need to do a significant amount of math to figure out the best zoom and center point such that you get the bounding box that is exact to what will be used by the service.


    http://rbrundritt.wordpress.com

    Monday, October 22, 2012 10:39 AM