diff options
author | Matthew Somerville <matthew@mysociety.org> | 2016-06-17 13:57:34 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-07-11 15:03:52 +0100 |
commit | 962b881830f9edb4f0b0b5aac3ece87c80af1f0a (patch) | |
tree | 222109707006df0f59358308bfb6cb57526a5243 /web/js/map-wmts-bristol.js | |
parent | 615e5b7b1cc1a829f4ee982659220a7a01a13639 (diff) |
Tidy up JavaScript functions.
Split big functions into smaller more descriptive ones.
Diffstat (limited to 'web/js/map-wmts-bristol.js')
-rw-r--r-- | web/js/map-wmts-bristol.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/web/js/map-wmts-bristol.js b/web/js/map-wmts-bristol.js index a1889beed..a69aa3b21 100644 --- a/web/js/map-wmts-bristol.js +++ b/web/js/map-wmts-bristol.js @@ -94,10 +94,10 @@ var matrix_ids = [ ]; /* - * set_map_config() is called on dom ready in map-OpenLayers.js + * maps.config() is called on dom ready in map-OpenLayers.js * to setup the way the map should operate. */ - function set_map_config(perm) { +fixmystreet.maps.config = function() { // This stuff is copied from js/map-bing-ol.js var nav_opts = { zoomWheelEnabled: false }; @@ -146,7 +146,7 @@ var matrix_ids = [ // Give main code a new bbox_strategy that translates between // lat/lon and our WMTS layer's coordinates fixmystreet.bbox_strategy = new OpenLayers.Strategy.ReprojectBBOX({ratio: 1}); -} +}; OpenLayers.Strategy.ReprojectBBOX = OpenLayers.Class(OpenLayers.Strategy.BBOX, { getMapBounds: function() { @@ -165,7 +165,7 @@ OpenLayers.Strategy.ReprojectBBOX = OpenLayers.Class(OpenLayers.Strategy.BBOX, { CLASS_NAME: "OpenLayers.Strategy.ReprojectBBOX" }); -function fms_marker_size_for_zoom(zoom) { +fixmystreet.maps.marker_size_for_zoom = function(zoom) { if (zoom >= 7) { return 'normal'; } else if (zoom >= 4) { @@ -173,4 +173,4 @@ function fms_marker_size_for_zoom(zoom) { } else { return 'mini'; } -} +}; |