static map by bounding box adds extra offset?!

6 posts / 0 new
Last post
static map by bounding box adds extra offset?!



I'm trying to generate a map by providing a strict boundingbox. In order to get the size correct, I calculate the distance in both directions between min and max, and translate those to a pixel size between 170 and 1920. This al works great.

However, it seems that Mapquest adds an extra margin to the image's boundingbox. The size of this margin is not static, but it changes between different map sizes and ratio's. To visualize this, I also place 2 markers on both the upper left corner and lower right corner :,-112.07819,33.44505,-112.07461000000131&locations=33.44505,-112.07461000000131||33.45222000000002,-112.07819&size=499,1198&margin=0


Is there a way to generate a map without this offset? I need precise imagery.


Kind regards,



The static maps, as well as
The static maps, as well as MapQuest.js maps, are bound to very specific zoom levels. There are no franctional zoom level to place precise points at map bounds. The points included in the map url are used for a best fit given those 18 zoom levels.

Use &margin=0

Use &margin=0

can we request metadata?

I have the same question...

As MQBrianCoakley mentioned, it is bound to zoom levels.  So if you specify boundingbox and size, it will see what zoom level at that size can cover the bounding box, and return that data.  That wll be larger than the bounding box you specified.

I know in Bing maps, you can make a static map call but add a parameter to request metadata, and it will return a json which includes the actual extents of the data.  I'm not sure if this can be done in MapQuest.

Otherwise, may have to do some math ahead of time to compute bounds based on pixel size for zoom levels, reproject, etc.  Not so easy.

There is no metadata response
There is no metadata response from the MapQuest static map api.