Created
May 20, 2014 21:52
-
-
Save Athantor/4562dafff72c48912e40 to your computer and use it in GitHub Desktop.
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
<TMS> | |
<Title>Bing</Title> | |
<Layer idx="0"> | |
<Script><![CDATA[ | |
( | |
function convert(z1, x1, y1) | |
{ | |
serverpart = 0 | |
serverpart = (serverpart + 1) % 4; | |
function encodeQuadTree(zoom, tilex, tiley) | |
{ | |
var tileNum = [] | |
for (var i = zoom - 1; i >= 0; i--) | |
{ | |
var num = (tilex % 2) | ((tiley % 2) << 1); | |
tileNum[i] = new String(num); | |
tilex >>= 1; | |
tiley >>= 1; | |
} | |
return tileNum.join(""); | |
} | |
return "http://ecn.t" + serverpart + ".tiles.virtualearth.net/tiles/a" + encodeQuadTree(z1,x1,y1) + ".jpeg?g=1036"; | |
} | |
) | |
]]></Script> | |
</Layer> | |
<Copyright>Microsoft - Bing</Copyright> | |
</TMS> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment