Add editMode to poiUtils.js, setupPOIs.js and useMapContextMenu.js

editMode von localStorage lesen und Rechte vergeben oder entnehmen wenn die Schaltfläche "Bearbeitungsmodus aktivieren"
This commit is contained in:
ISA
2024-09-06 11:25:32 +02:00
parent 861c9ead3d
commit af458ac270
3 changed files with 6 additions and 2 deletions

View File

@@ -29,6 +29,8 @@ export const setupPOIs = async (
setCurrentPoiData,
deviceName
) => {
const editMode = localStorage.getItem("editMode") === "true";
userRights = editMode ? userRights : undefined;
if (map && poiLayerRef.current) {
map.removeLayer(poiLayerRef.current);
poiLayerRef.current = new L.LayerGroup().addTo(map);