aboutsummaryrefslogtreecommitdiffstats
path: root/web/vendor/OpenLayers.Projection.OrdnanceSurvey.js
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2018-06-07 13:28:45 +0200
committerMarius Halden <marius.h@lden.org>2018-06-07 13:28:45 +0200
commit956f8b8a065824f9a9dc379eba1d0aa8b1b669cf (patch)
tree49f9ccb147b18dddee97500d4df7a3fb3dd3737c /web/vendor/OpenLayers.Projection.OrdnanceSurvey.js
parent782457d016084c8de04989dbc824a71899f8b41b (diff)
parent4dbf5371f79c5f290c08e561ba2c881e96b58669 (diff)
Merge tag 'v2.3.3' into fiksgatami-dev
Diffstat (limited to 'web/vendor/OpenLayers.Projection.OrdnanceSurvey.js')
-rw-r--r--web/vendor/OpenLayers.Projection.OrdnanceSurvey.js12
1 files changed, 10 insertions, 2 deletions
diff --git a/web/vendor/OpenLayers.Projection.OrdnanceSurvey.js b/web/vendor/OpenLayers.Projection.OrdnanceSurvey.js
index 85574d8e0..339f57a93 100644
--- a/web/vendor/OpenLayers.Projection.OrdnanceSurvey.js
+++ b/web/vendor/OpenLayers.Projection.OrdnanceSurvey.js
@@ -107,11 +107,19 @@ OpenLayers.Projection.OS = {
},
goog2osgb: function(point) {
- return OpenLayers.Projection.OS.projectForwardBritish(OpenLayers.Layer.SphericalMercator.projectInverse(point));
+ var p1 = OpenLayers.Layer.SphericalMercator.inverseMercator(point.x, point.y);
+ var p2 = OpenLayers.Projection.OS.projectForwardBritish({x: p1.lon, y: p1.lat});
+ point.x = p2.x;
+ point.y = p2.y;
+ return point;
},
osgb2goog: function(point) {
- return OpenLayers.Layer.SphericalMercator.projectForward(OpenLayers.Projection.OS.projectInverseBritish(point));
+ var p1 = OpenLayers.Projection.OS.projectInverseBritish(point);
+ var p2 = OpenLayers.Layer.SphericalMercator.forwardMercator(p1.x, p1.y);
+ point.x = p2.lon;
+ point.y = p2.lat;
+ return point;
},
/*****