开发者

Bing maps: Direct Access to tiles and Api key

i am using Bing map tiles in my Android application. I download tiles from http://h0.ortho.tiles.virtualearth.net/tiles/h<quadkey>.jpeg?g=131 and it works fine, but i understand that i need to append a token to this URL in order to mak开发者_如何转开发e this operation legal (and ask some kind of special permission from Microsoft). It is all well explained here: http://blogs.msdn.com/b/virtualearth/archive/2008/04/29/tracking-virtual-earth-tile-usage.aspx. But this post is from 2008 and i found on msdn site that in 2012, token-auth system will be replaced with key auth system.

Does anybody know how can i perform the direct tile access with this new auth system?

Thanks in advance


Accessing tiles directly with key-based authentication can be accomplished like so:

Using the REST ‘Get Imagery Metadata’ service to obtain the tile URL format for the type of tiles you wish to display: http://msdn.microsoft.com/en-us/library/ff701716.aspx - For example, if you wish to display Road tiles, the following request could be used (taken from the above documentation): http://dev.virtualearth.net/REST/V1/Imagery/Metadata/Road?mapVersion=v1&output=xml&key=BingMapsKey

Within the response, the URL for tiles is returned, with a placeholder for the tile quadkey.

A new REST request should be issued each time the map viewer in the application is instantiated, or whenever the map type is changed (eg. You wish to switch to aerial or hybrid map style)

Your platform usage can then be tracked based on the calls to the REST service.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜