aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-fms.js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-07-11 16:40:22 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-07-11 16:40:22 +0100
commit74ce84b43c0e714849d7ad021fb0400356ce2fa8 (patch)
treed96ad51f8cd6f14a6526ec282ad7e70d3eec25c6 /web/js/map-fms.js
parent0c5549a60ef3d86d672926d6e71c00cafff8326b (diff)
parent03ad5de783ac71695b1ce0d377dde549fc7311cb (diff)
Merge branch '1351-report-list-ajax'
Diffstat (limited to 'web/js/map-fms.js')
-rw-r--r--web/js/map-fms.js23
1 files changed, 12 insertions, 11 deletions
diff --git a/web/js/map-fms.js b/web/js/map-fms.js
index c5bf70191..65c02a503 100644
--- a/web/js/map-fms.js
+++ b/web/js/map-fms.js
@@ -1,13 +1,14 @@
-var fms_tile_base = [ [ '', 'a-', 'b-', 'c-' ], '//{S}tilma.mysociety.org/sv' ];
+fixmystreet.maps.tile_base = [ [ '', 'a-', 'b-', 'c-' ], '//{S}tilma.mysociety.org/sv' ];
-function set_map_config(perm) {
- _set_map_config();
-
- if (fixmystreet.map_type) {
- fms_tile_base = fixmystreet.map_type;
- }
- fixmystreet.map_type = OpenLayers.Layer.BingUK;
-}
+fixmystreet.maps.config = (function(original) {
+ return function(){
+ if (fixmystreet.map_type) {
+ this.tile_base = fixmystreet.map_type;
+ }
+ original();
+ fixmystreet.map_type = OpenLayers.Layer.BingUK;
+ };
+})(fixmystreet.maps.config);
OpenLayers.Layer.BingUK = OpenLayers.Class(OpenLayers.Layer.Bing, {
uk_bounds: [
@@ -54,8 +55,8 @@ OpenLayers.Layer.BingUK = OpenLayers.Class(OpenLayers.Layer.Bing, {
var in_uk = this.in_uk(bounds.getCenterLonLat());
if (z >= 16 && in_uk) {
urls = [];
- for (var i=0; i< fms_tile_base[0].length; i++) {
- urls.push( fms_tile_base[1].replace('{S}', fms_tile_base[0][i]) + "/${z}/${x}/${y}.png" );
+ for (var i=0; i< fixmystreet.maps.tile_base[0].length; i++) {
+ urls.push( fixmystreet.maps.tile_base[1].replace('{S}', fixmystreet.maps.tile_base[0][i]) + "/${z}/${x}/${y}.png" );
}
} else {
var type = '';