diff options
author | Struan Donald <struan@exo.org.uk> | 2012-05-11 13:20:26 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-05-11 13:20:26 +0100 |
commit | 2b93b526a5e8acf48e4ee112e2f5feb8436be1d2 (patch) | |
tree | ec10fdced7c8748684f3cd16a07f6eb23e324b11 /web/js | |
parent | 5accaad402d24f37851d8b85084fda2859b1ae16 (diff) | |
parent | beca2f7f8c96260541387d7135235f72ac86565b (diff) |
Merge remote-tracking branch 'origin/bromley' into bromley
Diffstat (limited to 'web/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 = ''; |