Merge pull request #693 from fkloft/pancontrol
Remove pan control from minimap
This commit is contained in:
commit
9721dfe105
@ -27,6 +27,12 @@ window.plugin.panControl.setup = function() {
|
|||||||
@@INCLUDERAW:external/L.Control.Pan.js@@
|
@@INCLUDERAW:external/L.Control.Pan.js@@
|
||||||
try { console.log('done loading Leaflet.Pancontrol JS'); } catch(e) {}
|
try { console.log('done loading Leaflet.Pancontrol JS'); } catch(e) {}
|
||||||
|
|
||||||
|
// prevent Pancontrol from being activated by default (e.g. in minimap)
|
||||||
|
L.Map.mergeOptions({
|
||||||
|
panControl: false
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
window.map.panControl = L.control.pan({panOffset: 350});
|
window.map.panControl = L.control.pan({panOffset: 350});
|
||||||
window.map.addControl(window.map.panControl);
|
window.map.addControl(window.map.panControl);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user