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 0d2b4eca53d93ebbcccae49205129c008c796456..b5469555c52e82475ea7f9b79286ba70bf25c952 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);