diff --git a/.env.development b/.env.development index 4542f8174..d49767358 100644 --- a/.env.development +++ b/.env.development @@ -24,4 +24,4 @@ NEXT_PUBLIC_USE_MOCKS=true # z.B. http://10.10.0.13/xyz/index.aspx -> basePath in config.json auf /xyz setzen # basePath wird jetzt in public/config.json gepflegt # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.1.328 +NEXT_PUBLIC_APP_VERSION=1.1.329 diff --git a/.env.production b/.env.production index ae886050b..766a53b5f 100644 --- a/.env.production +++ b/.env.production @@ -25,4 +25,4 @@ NEXT_PUBLIC_USE_MOCKS=false # basePath wird jetzt in public/config.json gepflegt # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.1.328 +NEXT_PUBLIC_APP_VERSION=1.1.329 diff --git a/components/devices/hooks/useDynamicDeviceLayers.js b/components/devices/hooks/useDynamicDeviceLayers.js index 8dd8361c7..b644dc634 100644 --- a/components/devices/hooks/useDynamicDeviceLayers.js +++ b/components/devices/hooks/useDynamicDeviceLayers.js @@ -57,16 +57,16 @@ const useDynamicDeviceLayers = (map, GisSystemStatic, mapLayersVisibility, prior if (layerRefs.current[key]) { // Entferne alle Marker aus der LayerGroup, bevor neue hinzugefügt werden layerRefs.current[key].clearLayers(); - (Array.isArray(newMarkers) ? newMarkers : []).forEach(marker => { + newMarkers.forEach(marker => { // Nur LayerGroup verwenden, nicht direkt auf map marker.addTo(layerRefs.current[key]); }); // Debug: Anzahl Marker in LayerGroup - /* console.log( + console.log( `[DeviceLayers] ${ layerRefs.current[key].getLayers().length } Marker in LayerGroup für ${key}` - ); */ + ); } setMarkerStates(prev => ({ ...prev, [key]: newMarkers })); }, @@ -86,7 +86,7 @@ const useDynamicDeviceLayers = (map, GisSystemStatic, mapLayersVisibility, prior Object.entries(markerStates).forEach(([key, markers]) => { const isVisible = mapLayersVisibility[key] ?? true; // undefined = true - (Array.isArray(markers) ? markers : []).forEach(marker => { + markers.forEach(marker => { const hasLayer = map.hasLayer(marker); // Logik korrigiert: diff --git a/nodemap-1.1.328.zip b/nodemap-1.1.328.zip new file mode 100644 index 000000000..741f18571 Binary files /dev/null and b/nodemap-1.1.328.zip differ diff --git a/package-lock.json b/package-lock.json index 807d01540..b6a107921 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nodemap", - "version": "1.1.328", + "version": "1.1.329", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nodemap", - "version": "1.1.328", + "version": "1.1.329", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", diff --git a/package.json b/package.json index 54c5a2d4a..3a2b09aff 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodemap", - "version": "1.1.328", + "version": "1.1.329", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0",