This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Believe it or not, Microsoft has this documented: | |
// http://msdn.microsoft.com/en-us/library/bb259689.aspx | |
function toBing(x, y, zoom) { | |
var x2 = pad(String(x.toString(2)), zoom + 1) | |
, y2 = pad(String(y.toString(2)), zoom + 1) | |
, quadkey = '' | |
; | |
function pad(n, p) { |