From 3e156a004bab3527e89d8d8d6d5a85a5b3eeb97e Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Tue, 26 Aug 2014 19:55:05 +0100 Subject: Make the level control position configurable --- src/leaflet-soton.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') 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 © OpenStreetMap contributors' + tileAttribution: 'Map data © OpenStreetMap 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); -- cgit v1.2.3