diff options
author | Matthew Somerville <matthew@mysociety.org> | 2012-05-11 10:44:51 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2012-05-11 10:44:51 +0100 |
commit | 2992b617968aa7d9b254673eb26283066af5ad56 (patch) | |
tree | 45df4964fc7d4e114150503c88b1fe9c95aba2ae /web/js/map-bing-ol.js | |
parent | 5e2a8889e27340dee9207d2360077973c9f8ba38 (diff) |
Different map base for Bromley.
Diffstat (limited to 'web/js/map-bing-ol.js')
-rw-r--r-- | web/js/map-bing-ol.js | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/web/js/map-bing-ol.js b/web/js/map-bing-ol.js index 89b274b18..488dec58a 100644 --- a/web/js/map-bing-ol.js +++ b/web/js/map-bing-ol.js @@ -1,3 +1,5 @@ +var tile_base = 'tilma.mysociety.org/sv'; + function set_map_config(perm) { var permalink_id; if ($('#map_permalink').length) { @@ -17,6 +19,9 @@ function set_map_config(perm) { new OpenLayers.Control.Permalink(permalink_id), new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' }) ]; + if (fixmystreet.map_type) { + tile_base = fixmystreet.map_type; + } fixmystreet.map_type = OpenLayers.Layer.Bing; } @@ -95,10 +100,10 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, { var url; if (z >= 16) { url = [ - "http://tilma.mysociety.org/sv/${z}/${x}/${y}.png", - "http://a.tilma.mysociety.org/sv/${z}/${x}/${y}.png", - "http://b.tilma.mysociety.org/sv/${z}/${x}/${y}.png", - "http://c.tilma.mysociety.org/sv/${z}/${x}/${y}.png" + "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" ]; } else { var type = ''; |