2

Based on this article Bing Map Usage, there are 2 ways to load the Bing Map:

  1. AJAXTileUsage, create a map session with bing map key and download the map tile: 8 map tile download is counted as one non-billable transaction
  2. LoadStandardMap, a map tile URL is used to download a map tile using a Bing Maps Key. 8 map tile download is counted as a billable transaction.

There is cost implication here. So obviously we should try to use the AJAXTileUsage.

However based on current reading and internet search, I am a little confused about what we are using right now. Basically we are just using Bing Map Ajax Control 7.0 Map class (see link). Our code doesn't really need to handle the map tile download ourselves.

Based on the http traffic capture from fiddler, here are the steps:

  1. client sends web services request to https://dev.virtualearth.net/webservices/v1/LoggingService/LoggingService.svc/Log with a bing map key
  2. a session id is created and returned to client
  3. map tiles are download, the download URL is like this: https://t0.ssl.ak.dynamic.tiles.virtualearth.net/comp/ch/0320?mkt=en-us&it=G,L&shading=hill&og=30&n=z&key=xxxxxxxxxJeOuGjaxxxxxxxxxxxxxxxxxxFc-Jxxxxxxxxxxxxxy_xxxxxx, (I replace some characters with xxx there). Interesting part is that this key is neither my bing map key nor my session id. I guess that it might contain the session id information within it although I am not sure how to decipher it.
  4. If I move around on the map, more tiles will be downloaded with similar above URL (with some difference at the number after comp/ch. It should be map tile quadkey there)

So does this mean that we are using AJAXTileUsage instead of LoadStandardMap? If so, it would be great since our tile usage won't be counted as billable. I tested with Bing Map trial key, however it seems that Bing Map Usage Report at Bing Map portal is not recording my usage even after couple days are already passed, so I could not figure out from there.

It would be really appreciated if someone could shed some lights here.

Update: by the way, for above map download URL, I could download map tile without any key: such as https://t2.ssl.ak.dynamic.tiles.virtualearth.net/comp/ch/xxxx?mkt=en-us&it=G,L&shading=hill&og=30&n=z (I changed the quadkey there)

Update 2: From post: http://www.bing.com/blogs/site_blogs/b/maps/archive/2012/02/01/bing-maps-reporting-tips.aspx:

Many of the Bing Maps API’s have a method for getting the credentials from the map after you
have loaded it using a valid Bing Maps key. One often overlooked feature is that, by getting the  
credentials from the map, you do not get back your original Bing Maps key. Instead, you get a 
special session key which you can use as a Bing Maps key to make requests to the Bing Maps 
services. By doing this, all transactions occurred by this session key will be non-billable.   
Many developers overlook this feature and opt to simply use their original Bing Maps key, not 
knowing that they are actually incurring more billable transactions than they need to

So based on above information, the mystery key for downloading map tile should be the session key.

1 Answer 1

3

If you are using one of the Bing Maps V7 JavaScript controls all tiles are counted under the AJAXTileUsage category. The only time tile usage is billed is if they are accessed directly or perhaps if you are using one of the old map controls

The reports in the Bing Maps portal take a several days to a week to sync due to the number of servers/data centers/users/and transactions generated.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.