Created
February 19, 2015 20:56
-
-
Save aembleton/c3a7205c247fd5817c79 to your computer and use it in GitHub Desktop.
Ordnance Survey map to be used in QLandkarte GT.
This file contains 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>Ordnance Survey</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://ak.t" + serverpart + ".tiles.virtualearth.net/tiles/r" + encodeQuadTree(z1,x1,y1) + ".png?g=3291&productSet=mmOS"; | |
} | |
) | |
]]></Script> | |
</Layer> | |
<Copyright>Ordnance Survey</Copyright> | |
</TMS> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
To use this tms file: