0
votes

I am grabbing maps from bing using their API: http://msdn.microsoft.com/en-us/library/ff701724.aspx

The largest tile they can return is 900x834. I need at least double that. Is there an easy way to figure out what the adjacent tiles are for any given zoom level and long/lat for a given resolution.

In other words, given a long,lat, zoom level, and resolution what would be the long lat for the 8 surrounding tiles in the same zoom level and resolution. Or is there a better way to get a large map?

Here's my GET request: http://dev.virtualearth.net/REST/v1/Imagery/Map/Aerial/#{lat},#{long}/#{rand(19)}?mapSize=900,834&format=png&key=MYKEY

1

1 Answers

1
votes

It is not possible to do this without breaking the rules set in the Terms of Use, especially the automation regarding your imagery retrieval (or composition). See: http://www.microsoft.com/maps/product/terms.html

If you want to do this anyway with maybe a dedicated agreement to proceed (if possible), I would recommend to use mapArea parameters rather than using the lat long of the center, see: http://msdn.microsoft.com/en-us/library/ff701724.aspx

See an example of mapArea imagery retrieval:

http://dev.virtualearth.net/REST/V1/Imagery/Map/road?mapArea=37.317227,-122.318439,37.939081,-122.194565&ms=500,600&pp=37.869505,-122.2705;35;BK&pp=37.428175,-122.169680;;ST&ml=TrafficFlow&key=BingMapsKey

If you want to access tile url in a supported way, you can use the same imagery service to retrieve metadata that will contain tile url. Tile are based on a quadkey model so you will be able to load the tile nearby your current view.