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

@@ -22,9 +22,9 @@ const determinePriority = (iconPath, priorityConfig) => {
export const createAndSetDevices = async (systemId, setMarkersFunction, GisSystemStatic, priorityConfig) => {
try {
// Zähler für externe API-Aufrufe in localStorage speichern
let requestCount = localStorage.getItem("gisStationsStaticRequestCount") || 0;
let requestCount = localStorage.getItem("gisStationsStaticRequestCount-createDevice") || 0;
requestCount++;
localStorage.setItem("gisStationsStaticRequestCount", requestCount);
localStorage.setItem("gisStationsStaticRequestCount-createDevice", requestCount);
console.log(`config.mapGisStationsStaticDistrictUrl in createAndSetDevice wurde ${requestCount} Mal aufgerufen.`);
const response1 = await fetch(config.mapGisStationsStaticDistrictUrl);