Remove pan control from minimap
(basically same issue as c537811e9b996bdcda80510d4e04e17fd3654796)
This commit is contained in:
parent
d548449933
commit
e8db2eac66
@ -26,10 +26,16 @@ window.plugin.panControl.setup = function() {
|
|||||||
try { console.log('Loading Leaflet.Pancontrol JS now'); } catch(e) {}
|
try { console.log('Loading Leaflet.Pancontrol JS now'); } catch(e) {}
|
||||||
@@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);
|
||||||
|
|
||||||
if(map.zoomControl._map) { // Move above the zoom control
|
if(map.zoomControl._map) { // Move above the zoom control
|
||||||
window.map.removeControl(map.zoomControl);
|
window.map.removeControl(map.zoomControl);
|
||||||
window.map.zoomControl = L.control.zoom();
|
window.map.zoomControl = L.control.zoom();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user