diff options
author | Matthew Somerville <matthew@mysociety.org> | 2019-07-16 17:29:47 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2019-09-30 11:12:18 +0100 |
commit | 06ea6b3a6c66f23b8c50279249e8286363289318 (patch) | |
tree | 2ef2e613598c056987069ef5c09409e61124cdc2 /web/js/map-wmts-base.js | |
parent | 8b962fdf43724c853b5959539b36b4d46b25639f (diff) |
[WMTS] Remove unneeded reprojection code.
The base layer does this transformation,
so I am not sure what this was for.
Diffstat (limited to 'web/js/map-wmts-base.js')
-rw-r--r-- | web/js/map-wmts-base.js | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/web/js/map-wmts-base.js b/web/js/map-wmts-base.js index fe8d8015e..43f829ab5 100644 --- a/web/js/map-wmts-base.js +++ b/web/js/map-wmts-base.js @@ -28,27 +28,4 @@ fixmystreet.maps.setup_wmts_base_map = function() { tileOrigin: new OpenLayers.LonLat(fixmystreet.wmts_config.origin_x, fixmystreet.wmts_config.origin_y) }); }); - - // 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() { - // Get the map bounds but return them in lat/lon, not - // local coordinates - if (this.layer.map === null) { - return null; - } - - var localBounds = this.layer.map.getExtent(); - // Transform bound corners into WGS84 - localBounds.transform( new OpenLayers.Projection(fixmystreet.wmts_config.map_projection), new OpenLayers.Projection("EPSG:4326") ); - return localBounds; - }, - - CLASS_NAME: "OpenLayers.Strategy.ReprojectBBOX" -}); |