aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2016-09-23 17:32:50 +0100
committerMatthew Somerville <matthew@mysociety.org>2016-09-23 17:34:13 +0100
commit781078aeb52ad838c682ebb061ccc2a28d3e53b1 (patch)
tree0e791ab7fc73ba25ec952b9e037ac5a5456e1d20 /web/js
parent2163df6b5160480aad51ee8be432d47550a14535 (diff)
[UK] A few small JavaScript fixes.
Cope better if things aren't defined.
Diffstat (limited to 'web/js')
-rw-r--r--web/js/OpenLayers.Projection.OrdnanceSurvey.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/web/js/OpenLayers.Projection.OrdnanceSurvey.js b/web/js/OpenLayers.Projection.OrdnanceSurvey.js
index bb596d3bf..85574d8e0 100644
--- a/web/js/OpenLayers.Projection.OrdnanceSurvey.js
+++ b/web/js/OpenLayers.Projection.OrdnanceSurvey.js
@@ -39,6 +39,8 @@
*
*/
+if (typeof OpenLayers !== "undefined") {
+
OpenLayers.Projection.OS = {
/**
@@ -487,3 +489,5 @@ OpenLayers.Projection.addTransform("EPSG:900913", "EPSG:27700",
OpenLayers.Projection.OS.goog2osgb);
OpenLayers.Projection.addTransform("EPSG:27700", "EPSG:900913",
OpenLayers.Projection.OS.osgb2goog);
+
+}