Revert "add inspect toggle callback"

This reverts commit 3acbbb602b6eed29dfa5c592b6c848b1d19d03bb.
This commit is contained in:
acalcutt 2023-02-08 00:09:43 -05:00 committed by Andrew Calcutt
parent 0bb8f89353
commit 55e6dbba38

View file

@ -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 });