Satellite image much larger than the requested coordinates

Tiberiu Chelcea 21 Reputation points
2022-09-19T18:53:41.297+00:00

I use the BingMapsRESTToolkit package to make calls to Bing Maps for satellite background images. These images are to be included in a PDF file that gets printed by our users. However, the satellite images produced by Bing Maps show a much larger area than the one requested.

Here you can see one such case. The pushpins are rendered at the actual coordinates (the MapArea BoundingBox in an ImageryRequest). As you can see, the image returned by Bing Maps has some (fairly substantial) extra padding around the requested coordinates.

Is there a way to make Bing Maps return an image that spans the requested MapArea and nothing more? (In my case, I can easily crop the image to the pushpins' pixel coordinates, which are returned by Bing Maps, but that leaves out the map attribution, which is forbidden)

242636-static-map-uncropped.jpg

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
696 questions
0 comments No comments
{count} votes

Accepted answer
  1. rbrundritt 17,181 Reputation points Microsoft Employee
    2022-09-20T16:56:58.45+00:00

    This is to be expected. Your bounding box is used to determine the center and best integer zoom level that will fit your data. The map will rarely if ever be tight on your bounding box, and especially since the aspect ratio of your bounding box and requested image size would also need to be perfect for that to happen. Note that if fractional zoom levels were used you would end up with an image that isn't as clear because it would have to be scaled.

    Here are a couple of older articles that give insights into what is happening under the hood:

    https://rbrundritt.wordpress.com/2009/07/21/determining-best-map-view-for-an-array-of-locations/

    https://rbrundritt.wordpress.com/2008/10/25/ve-imagery-service-and-custom-icons/


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.