diff options
author | Christopher Baines <cb15g11@soton.ac.uk> | 2014-08-26 19:55:05 +0100 |
---|---|---|
committer | Christopher Baines <cb15g11@soton.ac.uk> | 2014-08-26 19:55:05 +0100 |
commit | 3e156a004bab3527e89d8d8d6d5a85a5b3eeb97e (patch) | |
tree | 1025fbc4b41d54dd7993170fb8d3650144857e62 | |
parent | bc8929fce24eb64e0f781daba7b94fe3a6bf2fe1 (diff) | |
download | leaflet-soton-3e156a004bab3527e89d8d8d6d5a85a5b3eeb97e.tar leaflet-soton-3e156a004bab3527e89d8d8d6d5a85a5b3eeb97e.tar.gz |
Make the level control position configurable
-rw-r--r-- | src/leaflet-soton.js | 6 |
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 © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors' + tileAttribution: 'Map data © <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); |