Add support for TMS tile-numbering scheme
authorRichard Fairhurst <richard@systemeD.net>
Sat, 2 Apr 2011 14:39:07 +0000 (15:39 +0100)
committerRichard Fairhurst <richard@systemeD.net>
Sat, 2 Apr 2011 14:39:07 +0000 (15:39 +0100)
net/systemeD/halcyon/TileSet.as

index 0d2b4ec..b546955 100644 (file)
@@ -224,6 +224,11 @@ package net.systemeD.halcyon {
                                        }
                                        t=baseurl.replace('$quadkey',u); break;
 
+                               case 'tms':
+                                       ty=Math.pow(2,tz)-1-ty;
+                                       t=baseurl.replace('$z',map.scale).replace('$x',tx).replace('$y',ty);
+                                       break;
+
                                default:
                                        if (baseurl.indexOf('$x')>-1) {
                                                t=baseurl.replace('$z',map.scale).replace('$x',tx).replace('$y',ty);