WIP. polylines visiblity
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
]);
|
||||
|
||||
//--------------------------------------------
|
||||
|
||||
BIN
nodemap-1.1.332.zip
Normal file
BIN
nodemap-1.1.332.zip
Normal file
Binary file not shown.
4
package-lock.json
generated
4
package-lock.json
generated
@@ -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",
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user