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