From: Tom Hughes Date: Wed, 10 Oct 2007 15:00:13 +0000 (+0000) Subject: Get URL selection right... X-Git-Tag: live~8624 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/63bd068f2ed5027485dff791ab44e31fbdaf4052?ds=sidebyside Get URL selection right... --- diff --git a/public/javascripts/map.js b/public/javascripts/map.js index fab00e81d..3f1b83af4 100644 --- a/public/javascripts/map.js +++ b/public/javascripts/map.js @@ -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; } }