Get URL selection right...
authorTom Hughes <tom@compton.nu>
Wed, 10 Oct 2007 15:00:13 +0000 (15:00 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 10 Oct 2007 15:00:13 +0000 (15:00 +0000)
public/javascripts/map.js

index fab00e81d924e81659331add94646d0ea3f4c98b..3f1b83af418c4a1575c750cde737e631eb56ffb3 100644 (file)
@@ -47,7 +47,15 @@ function getTileURL(bounds) {
    {
      x = ((x % limit) + limit) % limit;
 
-     return this.url + z + "/" + x + "/" + y + "." + this.type;
+     var url = this.url;
+     var path = z + "/" + x + "/" + y + "." + this.type;
+
+     if (url instanceof Array)
+     {
+        url = this.selectUrl(path, url);
+     }
+
+     return url + path;
    }
 }