aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2012-05-25 18:07:20 +0100
committerStruan Donald <struan@exo.org.uk>2012-05-25 18:07:20 +0100
commit6b26b7ec133eb9bdd4a9bed45477ec6d9d78304c (patch)
tree24cc24b1536ea4bdd6fa717a5a268d85ddad3325 /web/js
parent0ff2c1689fafab7ed533b3989075c34f3c1a8779 (diff)
parent5ab9f3916e43372a89dd78740b752de2c7cf2552 (diff)
Merge remote-tracking branch 'origin/bromley' into bromley
Diffstat (limited to 'web/js')
-rw-r--r--web/js/map-bing-ol.js16
1 files changed, 4 insertions, 12 deletions
diff --git a/web/js/map-bing-ol.js b/web/js/map-bing-ol.js
index 9bff93e27..7d40f8afc 100644
--- a/web/js/map-bing-ol.js
+++ b/web/js/map-bing-ol.js
@@ -1,4 +1,4 @@
-var tile_base = 'tilma.mysociety.org/sv';
+var tile_base = [ [ '', 'a.', 'b.', 'c.' ], 'http://{S}tilma.mysociety.org/sv' ];
function set_map_config(perm) {
var permalink_id;
@@ -99,17 +99,9 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
var url;
if (z >= 16) {
- if (tile_base.substring(0,1) == '/') {
- url = [
- tile_base + "/${z}/${x}/${y}.png"
- ];
- } else {
- url = [
- "http://" + tile_base + "/${z}/${x}/${y}.png",
- "http://a." + tile_base + "/${z}/${x}/${y}.png",
- "http://b." + tile_base + "/${z}/${x}/${y}.png",
- "http://c." + tile_base + "/${z}/${x}/${y}.png"
- ];
+ url = [];
+ for (var i=0; i< tile_base[0].length; i++) {
+ url.push( tile_base[1].replace('{S}', tile_base[0][i]) + "/${z}/${x}/${y}.png" );
}
} else {
var type = '';