aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-08-17 18:36:50 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-08-17 18:36:50 +0100
commit525ca068756d74fafa33cf0626ef10ac50140057 (patch)
tree80bf195a4cacb218f3e2ccec02aabb71211d052d /web/js
parenta9be1c52445e4281311f7420ea514f1e7485b50d (diff)
Move non-JavaScript pan/zoom to same as with JS.
No need to use old OpenLayers PanZoom defaults, or load images we don't want to use.
Diffstat (limited to 'web/js')
-rw-r--r--web/js/map-OpenLayers.js25
1 files changed, 18 insertions, 7 deletions
diff --git a/web/js/map-OpenLayers.js b/web/js/map-OpenLayers.js
index f202e1392..2790f13d3 100644
--- a/web/js/map-OpenLayers.js
+++ b/web/js/map-OpenLayers.js
@@ -569,6 +569,17 @@ OpenLayers.Control.PanZoomFMS = OpenLayers.Class(OpenLayers.Control.PanZoom, {
}
}
},
+ _addButton: function(id1, id2) {
+ var btn = document.createElement('div'),
+ id = id1 + id2;
+ btn.innerHTML = id1 + ' ' + id2;
+ btn.id = this.id + "_" + id;
+ btn.action = id;
+ btn.className = "olButton";
+ this.div.appendChild(btn);
+ this.buttons.push(btn);
+ return btn;
+ },
moveTo: function(){},
draw: function(px) {
// A customised version of .draw() that doesn't specify
@@ -576,13 +587,13 @@ OpenLayers.Control.PanZoomFMS = OpenLayers.Class(OpenLayers.Control.PanZoom, {
// 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");
+ this._addButton("pan", "up");
+ this._addButton("pan", "left");
+ this._addButton("pan", "right");
+ this._addButton("pan", "down");
+ this._addButton("zoom", "in");
+ this._addButton("zoom", "world");
+ this._addButton("zoom", "out");
return this.div;
}
});