aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/Map/Bromley.pm2
-rw-r--r--web/js/map-bing-ol.js12
2 files changed, 6 insertions, 8 deletions
diff --git a/perllib/FixMyStreet/Map/Bromley.pm b/perllib/FixMyStreet/Map/Bromley.pm
index 4f4c2fae8..20821236f 100644
--- a/perllib/FixMyStreet/Map/Bromley.pm
+++ b/perllib/FixMyStreet/Map/Bromley.pm
@@ -12,7 +12,7 @@ use base 'FixMyStreet::Map::FMS';
use strict;
sub map_type {
- return '"https://{S}-fix.bromley.gov.uk/tilma"';
+ return '[ [ "", "a-" ], "https://{S}fix.bromley.gov.uk/tilma" ]';
}
sub map_tile_base {
diff --git a/web/js/map-bing-ol.js b/web/js/map-bing-ol.js
index 405195437..7d40f8afc 100644
--- a/web/js/map-bing-ol.js
+++ b/web/js/map-bing-ol.js
@@ -1,4 +1,4 @@
-var tile_base = 'http://{S}.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,12 +99,10 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
var url;
if (z >= 16) {
- url = [
- tile_base.replace('{S}.', '').replace('{S}-', '') + "/${z}/${x}/${y}.png", // Yuck
- tile_base.replace('{S}', 'a') + "/${z}/${x}/${y}.png",
- tile_base.replace('{S}', 'b') + "/${z}/${x}/${y}.png",
- tile_base.replace('{S}', 'c') + "/${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 = '';
if (z > 10) { type = '&productSet=mmOS'; }