aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-09-20 11:27:16 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-09-20 12:24:30 +0100
commit791b23f8610b4a616ac0899995c96231b8e8e633 (patch)
treefcdccde4aeabde1521a3a54e54a7aebc266890fd
parentdc7613329c275cd158fdde8faf1c0e301f5b7202 (diff)
[Zurich] Fix map offset bug.
The upgrade to OpenLayers in 31b8337e3 was not accompanied by fixing the tileOrigin manually tweaked as an old workaround. This moved the map c. 100m out of alignment. Bristol fixed this in a7f60abb by adding topLeftCorners, but this is better done by fixing origin_x/y.
-rw-r--r--perllib/FixMyStreet/Map/Bristol.pm8
-rw-r--r--perllib/FixMyStreet/Map/Zurich.pm8
-rw-r--r--web/js/map-wmts-bristol.js9
-rw-r--r--web/js/map-wmts-zurich.js8
4 files changed, 8 insertions, 25 deletions
diff --git a/perllib/FixMyStreet/Map/Bristol.pm b/perllib/FixMyStreet/Map/Bristol.pm
index c2925ff8d..0e3079b0b 100644
--- a/perllib/FixMyStreet/Map/Bristol.pm
+++ b/perllib/FixMyStreet/Map/Bristol.pm
@@ -30,12 +30,8 @@ sub tile_parameters {
dpi => 96,
inches_per_unit => 39.3701, # BNG uses metres
projection => 'EPSG:27700',
- # The original tile origin values from the getCapabilities call are
- # -5220400.0/4470200.0, but this results in the map tile being offset
- # slightly. These corrected values were figured out manually by
- # trial and error...
- origin_x => -5220385.5,
- origin_y => 4470189.0,
+ origin_x => -5220400.0,
+ origin_y => 4470200.0,
};
return $params;
}
diff --git a/perllib/FixMyStreet/Map/Zurich.pm b/perllib/FixMyStreet/Map/Zurich.pm
index ed68daeee..b9d6e3297 100644
--- a/perllib/FixMyStreet/Map/Zurich.pm
+++ b/perllib/FixMyStreet/Map/Zurich.pm
@@ -34,12 +34,8 @@ sub tile_parameters {
dpi => 96,
inches_per_unit => 39.3701, # BNG uses metres
projection => 'EPSG:2056',
- # The original tile origin values from the getCapabilities call are
- # -27386400.0/31814500.0, but this results in the map tile being offset
- # slightly. These corrected values were figured out manually by
- # trial and error...
- origin_x => -27386322.5,
- origin_y => 31814423.0,
+ origin_x => -27386400.0,
+ origin_y => 31814500.0,
};
return $params;
}
diff --git a/web/js/map-wmts-bristol.js b/web/js/map-wmts-bristol.js
index 4a48da27f..35f5ed0d6 100644
--- a/web/js/map-wmts-bristol.js
+++ b/web/js/map-wmts-bristol.js
@@ -14,7 +14,6 @@ fixmystreet.maps.matrix_ids = [
"identifier": "0",
"supportedCRS": "urn:ogc:def:crs:EPSG::27700",
"scaleDenominator": 181428.9342864172,
- "topLeftCorner": { "lat": 4470200, "lon": -5220400 },
"tileWidth": 256,
"tileHeight": 256,
"matrixWidth": 432,
@@ -24,7 +23,6 @@ fixmystreet.maps.matrix_ids = [
"identifier": "1",
"supportedCRS": "urn:ogc:def:crs:EPSG::27700",
"scaleDenominator": 90714.4671432086,
- "topLeftCorner": { "lat": 4470200, "lon": -5220400 },
"tileWidth": 256,
"tileHeight": 256,
"matrixWidth": 863,
@@ -34,7 +32,6 @@ fixmystreet.maps.matrix_ids = [
"identifier": "2",
"supportedCRS": "urn:ogc:def:crs:EPSG::27700",
"scaleDenominator": 45357.2335716043,
- "topLeftCorner": { "lat": 4470200, "lon": -5220400 },
"tileWidth": 256,
"tileHeight": 256,
"matrixWidth": 1725,
@@ -44,7 +41,6 @@ fixmystreet.maps.matrix_ids = [
"identifier": "3",
"supportedCRS": "urn:ogc:def:crs:EPSG::27700",
"scaleDenominator": 22678.61678580215,
- "topLeftCorner": { "lat": 4470200, "lon": -5220400 },
"tileWidth": 256,
"tileHeight": 256,
"matrixWidth": 3449,
@@ -54,7 +50,6 @@ fixmystreet.maps.matrix_ids = [
"identifier": "4",
"supportedCRS": "urn:ogc:def:crs:EPSG::27700",
"scaleDenominator": 11339.308392901075,
- "topLeftCorner": { "lat": 4470200, "lon": -5220400 },
"tileWidth": 256,
"tileHeight": 256,
"matrixWidth": 6898,
@@ -64,7 +59,6 @@ fixmystreet.maps.matrix_ids = [
"identifier": "5",
"supportedCRS": "urn:ogc:def:crs:EPSG::27700",
"scaleDenominator": 5669.654196450538,
- "topLeftCorner": { "lat": 4470200, "lon": -5220400 },
"tileWidth": 256,
"tileHeight": 256,
"matrixWidth": 13795,
@@ -74,7 +68,6 @@ fixmystreet.maps.matrix_ids = [
"identifier": "6",
"supportedCRS": "urn:ogc:def:crs:EPSG::27700",
"scaleDenominator": 2834.827098225269,
- "topLeftCorner": { "lat": 4470200, "lon": -5220400 },
"tileWidth": 256,
"tileHeight": 256,
"matrixWidth": 27590,
@@ -84,7 +77,6 @@ fixmystreet.maps.matrix_ids = [
"identifier": "7",
"supportedCRS": "urn:ogc:def:crs:EPSG::27700",
"scaleDenominator": 1181.177957593862,
- "topLeftCorner": { "lat": 4470200, "lon": -5220400 },
"tileWidth": 256,
"tileHeight": 256,
"matrixWidth": 66215,
@@ -94,7 +86,6 @@ fixmystreet.maps.matrix_ids = [
"identifier": "8",
"supportedCRS": "urn:ogc:def:crs:EPSG::27700",
"scaleDenominator": 708.7067745563172,
- "topLeftCorner": { "lat": 4470200, "lon": -5220400 },
"tileWidth": 256,
"tileHeight": 256,
"matrixWidth": 110359,
diff --git a/web/js/map-wmts-zurich.js b/web/js/map-wmts-zurich.js
index 6bc1c5e14..0a753e831 100644
--- a/web/js/map-wmts-zurich.js
+++ b/web/js/map-wmts-zurich.js
@@ -4,10 +4,10 @@
// From 'fullExtent' from http://www.gis.stadt-zuerich.ch/maps/rest/services/tiled95/LuftbildHybrid/MapServer?f=pjson
fixmystreet.maps.layer_bounds = new OpenLayers.Bounds(
- 2676000.9069999997, // W
- 1241399.842, // S
- 2689900.9069999997, // E
- 1254599.842); // N
+ 2674687.5, // W
+ 1240500, // S
+ 2690000, // E
+ 1255500); // N
fixmystreet.maps.matrix_ids = [
// The two highest zoom levels are pretty much useless so they're disabled.