Skip to content

Instantly share code, notes, and snippets.

@aembleton
Created February 19, 2015 20:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aembleton/c3a7205c247fd5817c79 to your computer and use it in GitHub Desktop.
Save aembleton/c3a7205c247fd5817c79 to your computer and use it in GitHub Desktop.
Ordnance Survey map to be used in QLandkarte GT.
<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>
@aembleton
Copy link
Author

To use this tms file:

  1. Install QLandkarte GT. You can get it from http://sourceforge.net/projects/qlandkartegt/
  2. Open QLandkarte GT.
  3. Go to File > Load Map
  4. Download this tms file and select it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment