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,
|
||||
showCompass: true
|
||||
}));
|
||||
const inspectUrlTag = '&inspect';
|
||||
map.addControl(new MaplibreInspect({
|
||||
showMapPopupOnHover: false,
|
||||
showInspectMapPopupOnHover: false,
|
||||
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, '');
|
||||
}
|
||||
}
|
||||
selectThreshold: 5
|
||||
}));
|
||||
} else {
|
||||
var map = L.map('map', { zoomControl: false });
|
||||
|
|
|
|||
Loading…
Reference in a new issue