diff --git a/.env.development b/.env.development index aa1a85841..9f7de966c 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.332 +NEXT_PUBLIC_APP_VERSION=1.1.333 diff --git a/.env.production b/.env.production index bff09ed9e..9cec42acc 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.332 +NEXT_PUBLIC_APP_VERSION=1.1.333 diff --git a/components/mainComponent/MapComponent.js b/components/mainComponent/MapComponent.js index a5fae8a21..a43586863 100644 --- a/components/mainComponent/MapComponent.js +++ b/components/mainComponent/MapComponent.js @@ -374,6 +374,10 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { return; } + // Prüfe Sichtbarkeit aus localStorage und Redux + const localStoragePolylineVisible = localStorage.getItem("polylineVisible") === "true"; + const reduxPolylineLayerVisible = poiLayerVisible; // redux: polylineLayerVisible.visible + // vorherige Marker & Polylinien vollständig bereinigen (Array.isArray(markers) ? markers : []).forEach(marker => { marker.remove(); @@ -382,7 +386,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { // Setze neue Marker und Polylinien mit den aktuellen Daten (asynchron!) const updatePolylines = async () => { - if (polylineVisible) { + if (localStoragePolylineVisible && reduxPolylineLayerVisible) { const { markers: newMarkers, polylines: newPolylines } = await setupPolylines( map, linePositions, @@ -456,6 +460,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { tempMarker, polylineVisible, isTalasAllowed, + poiLayerVisible, ]); //-------------------------------------------- diff --git a/nodemap-1.1.332.zip b/nodemap-1.1.332.zip new file mode 100644 index 000000000..1f1a4c086 Binary files /dev/null and b/nodemap-1.1.332.zip differ diff --git a/package-lock.json b/package-lock.json index f87265f7d..91303a203 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "nodemap", - "version": "1.1.332", + "version": "1.1.333", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "nodemap", - "version": "1.1.332", + "version": "1.1.333", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0", diff --git a/package.json b/package.json index 25a2b96a0..61d2b3662 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nodemap", - "version": "1.1.332", + "version": "1.1.333", "dependencies": { "@emotion/react": "^11.13.3", "@emotion/styled": "^11.13.0",