WIP. polylines visiblity

This commit is contained in:
ISA
2025-08-21 09:47:03 +02:00
parent 2066cbb9e8
commit 2da79c9318
6 changed files with 11 additions and 6 deletions

View File

@@ -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 # 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 # basePath wird jetzt in public/config.json gepflegt
# App-Versionsnummer # App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.1.332 NEXT_PUBLIC_APP_VERSION=1.1.333

View File

@@ -25,4 +25,4 @@ NEXT_PUBLIC_USE_MOCKS=false
# basePath wird jetzt in public/config.json gepflegt # basePath wird jetzt in public/config.json gepflegt
# App-Versionsnummer # App-Versionsnummer
NEXT_PUBLIC_APP_VERSION=1.1.332 NEXT_PUBLIC_APP_VERSION=1.1.333

View File

@@ -374,6 +374,10 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
return; 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 // vorherige Marker & Polylinien vollständig bereinigen
(Array.isArray(markers) ? markers : []).forEach(marker => { (Array.isArray(markers) ? markers : []).forEach(marker => {
marker.remove(); marker.remove();
@@ -382,7 +386,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
// Setze neue Marker und Polylinien mit den aktuellen Daten (asynchron!) // Setze neue Marker und Polylinien mit den aktuellen Daten (asynchron!)
const updatePolylines = async () => { const updatePolylines = async () => {
if (polylineVisible) { if (localStoragePolylineVisible && reduxPolylineLayerVisible) {
const { markers: newMarkers, polylines: newPolylines } = await setupPolylines( const { markers: newMarkers, polylines: newPolylines } = await setupPolylines(
map, map,
linePositions, linePositions,
@@ -456,6 +460,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
tempMarker, tempMarker,
polylineVisible, polylineVisible,
isTalasAllowed, isTalasAllowed,
poiLayerVisible,
]); ]);
//-------------------------------------------- //--------------------------------------------

BIN
nodemap-1.1.332.zip Normal file

Binary file not shown.

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{ {
"name": "nodemap", "name": "nodemap",
"version": "1.1.332", "version": "1.1.333",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "nodemap", "name": "nodemap",
"version": "1.1.332", "version": "1.1.333",
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.13.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "nodemap", "name": "nodemap",
"version": "1.1.332", "version": "1.1.333",
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.3", "@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0", "@emotion/styled": "^11.13.0",