aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-OpenLayers.js
diff options
context:
space:
mode:
authorZarino Zappia <mail@zarino.co.uk>2016-04-01 15:36:49 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-06-01 12:46:06 +0100
commit7f135798a6523ba7e7e0125007550abc9cc6916c (patch)
tree3bbd5836dc16bdd20236b4369fb8cfeed62ded9d /web/js/map-OpenLayers.js
parent5500db6a5c5868c7f38254a09b171ca819ccfd93 (diff)
Stop PanZoom giving controls hard-coded positions.
We previously used !important to override them in the CSS, but better to prevent them being set in the JavaScript in the first place.
Diffstat (limited to 'web/js/map-OpenLayers.js')
-rw-r--r--web/js/map-OpenLayers.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index 267643898..bef9bd58f 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -547,6 +547,22 @@ OpenLayers.Control.PanZoomFMS = OpenLayers.Class(OpenLayers.Control.PanZoom, {
break;
}
}
+ },
+ moveTo: function(){},
+ draw: function(px) {
+ // A customised version of .draw() that doesn't specify
+ // and dimensions/positions for the buttons, since we
+ // size and position them all using CSS.
+ OpenLayers.Control.prototype.draw.apply(this, arguments);
+ this.buttons = [];
+ this._addButton("panup", "north-mini.png");
+ this._addButton("panleft", "west-mini.png");
+ this._addButton("panright", "east-mini.png");
+ this._addButton("pandown", "south-mini.png");
+ this._addButton("zoomin", "zoom-plus-mini.png");
+ this._addButton("zoomworld", "zoom-world-mini.png");
+ this._addButton("zoomout", "zoom-minus-mini.png");
+ return this.div;
}
});