Reputation: 73
I generate some image using google bing api:
<img src="http://t0.tiles.virtualearth.net/tiles/a1210223003.jpeg?g=854&mkt=en-US&token=Key">
<img src="http://t0.tiles.virtualearth.net/tiles/a1210223003.jpeg?g=854&mkt=en-US&token=Key">
I get those image sources based on this :
var imageSource = "http://t0.tiles.virtualearth.net/tiles/a"+quadKey+".jpeg?g=854&mkt=en-US&token=key";
The thing is that, if I want to keep this key secret, is any way to achive this ?
Upvotes: 1
Views: 305
Reputation: 17954
This is not how you directly access the Bing Maps tiles. If you want to directly access the Bing Maps tiles your application must first make a call the Bing Maps REST imagery service to get the tile URL from the Imagery metadata service every time your application first starts up. This will generate a transaction for reporting purposes and will also provide you with the latest tile URL (they change regularly). Send me an email at richbrun at microsoft.com and I'll provide you a document that goes into more details on this.
As for the Bing Maps key in the URL, there is no need to hide it, anyone can create a Bing Maps key and use it under the free terms of use. In most cases when it appears someone has stolen a key, the root cause is that code that included the key was handed off or made public (i.e. in forum posts) and the users of the code were unaware of the key. However, the Bing Maps team is able to look into situations like these and split out the extra traffic and help resolve the issue. When people do knowingly steal Bing Maps keys, they usually just grab it from the Bing Maps website.
Upvotes: 1