summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristopher Baines <cb15g11@soton.ac.uk>2014-08-26 19:55:05 +0100
committerChristopher Baines <cb15g11@soton.ac.uk>2014-08-26 19:55:05 +0100
commit3e156a004bab3527e89d8d8d6d5a85a5b3eeb97e (patch)
tree1025fbc4b41d54dd7993170fb8d3650144857e62 /src
parentbc8929fce24eb64e0f781daba7b94fe3a6bf2fe1 (diff)
downloadleaflet-soton-3e156a004bab3527e89d8d8d6d5a85a5b3eeb97e.tar
leaflet-soton-3e156a004bab3527e89d8d8d6d5a85a5b3eeb97e.tar.gz
Make the level control position configurable
Diffstat (limited to 'src')
-rw-r--r--src/leaflet-soton.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/leaflet-soton.js b/src/leaflet-soton.js
index 931bb3c..98a4f09 100644
--- a/src/leaflet-soton.js
+++ b/src/leaflet-soton.js
@@ -352,7 +352,8 @@ SELECT * WHERE {\
zoom: 17,
detectRetina: true,
tileUrl: 'http://bus.southampton.ac.uk/graphics/map/tiles/{z}/{x}/{y}.png',
- tileAttribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
+ tileAttribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors',
+ levelControlPosition: 'bottomright'
},
initialize: function (id, options) {
@@ -690,7 +691,8 @@ SELECT * WHERE {\
map.levelControl = L.Control.level({
levels: map.indoorLayer.getLevels(),
- level: map._startLevel
+ level: map._startLevel,
+ position: options.levelControlPosition
});
map.levelControl.addEventListener("levelchange", map.indoorLayer.setLevel, map.indoorLayer);