Revert "add inspect toggle callback"
This reverts commit 3acbbb602b6eed29dfa5c592b6c848b1d19d03bb.
This commit is contained in:
parent
0bb8f89353
commit
55e6dbba38
1 changed files with 1 additions and 10 deletions
|
|
@ -55,19 +55,10 @@
|
||||||
showZoom: true,
|
showZoom: true,
|
||||||
showCompass: true
|
showCompass: true
|
||||||
}));
|
}));
|
||||||
const inspectUrlTag = '&inspect';
|
|
||||||
map.addControl(new MaplibreInspect({
|
map.addControl(new MaplibreInspect({
|
||||||
showMapPopupOnHover: false,
|
showMapPopupOnHover: false,
|
||||||
showInspectMapPopupOnHover: false,
|
showInspectMapPopupOnHover: false,
|
||||||
selectThreshold: 5,
|
selectThreshold: 5
|
||||||
showInspectMap: window.location.hash.includes(inspectUrlTag),
|
|
||||||
toggleCallback: function(showInspectMap) {
|
|
||||||
if (showInspectMap) {
|
|
||||||
window.location.hash += inspectUrlTag;
|
|
||||||
} else {
|
|
||||||
window.location.hash = window.location.hash.replace(inspectUrlTag, '');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
var map = L.map('map', { zoomControl: false });
|
var map = L.map('map', { zoomControl: false });
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue