# How do I know the value of QuadKey in real time?

• ### Question

• How do I know the value of QuadKey in real time?
If possible without using IHttpHandler (I can not use properly when with Silverlight)
• Moved by Saturday, March 10, 2012 10:09 AM (From:Bing Maps: Map Control and Web services Development)
Monday, July 18, 2011 2:50 PM

• Which quadkey do you want to know? The QuadKey system is a defined structure consistant throughout. This allows us to calculate the quadkey for a particular tile at any zoom level and any location on the globel. Here is an article explaining the tile system: http://msdn.microsoft.com/en-us/library/bb259689.aspx
Windows Live Developer MVP - http://rbrundritt.wordpress.com | http://inknowledge.co.uk
• Marked as answer by Wednesday, September 14, 2011 7:52 PM
Monday, July 18, 2011 4:38 PM
• You can use the calculation sin the link I provided to calculate all the quadkeys values in the current map view as you move around on the map. Note that a single map view is made up of multiple tiles, each tile having it's own quadkey.

An easy way to calculate these quadkeys is to take the top left and bottom right coordinates of the map view. Then calculate the tile X and Y positions (review link posted earlier). Then take the X and Y values between the top left corner and bottom right corner to calculate all the pairs of X & Y. You can then take all these X&Y values along with the zoom level and calculate all the quadkeys. Better yet, use the X, Y and zoomlevel in the QuadKey object and it will calculate the quadkey value for you.

Windows Live Developer MVP - http://rbrundritt.wordpress.com | http://inknowledge.co.uk
• Marked as answer by Wednesday, September 14, 2011 7:52 PM
Tuesday, July 19, 2011 3:43 PM

### All replies

• Which quadkey do you want to know? The QuadKey system is a defined structure consistant throughout. This allows us to calculate the quadkey for a particular tile at any zoom level and any location on the globel. Here is an article explaining the tile system: http://msdn.microsoft.com/en-us/library/bb259689.aspx
Windows Live Developer MVP - http://rbrundritt.wordpress.com | http://inknowledge.co.uk
• Marked as answer by Wednesday, September 14, 2011 7:52 PM
Monday, July 18, 2011 4:38 PM
• Thank you for the return,

I want to know where this Quadkey Maps in real time.
For example: I'm watching the city of Sao Paulo with 11 zoom.
I'd like to automatically map the properties, Quadkey know what I'm viewing.
I've seen programs that do this, but could not alone.
Monday, July 18, 2011 6:22 PM
• If you'd like to know the quadkeys of the tiles that make up a particular map image, you can use Firebug or Fiddler to examine the HTTP requests from the page. For the area around Sao Paulo at zoom level 11, these will be something like 21031112103