docs: [Zurück zur Übersicht](../README.md) in Alle in README für jeder Verzeichnis
This commit is contained in:
8
docs/utils/polylines/README.md
Normal file
8
docs/utils/polylines/README.md
Normal file
@@ -0,0 +1,8 @@
|
||||
# 📄 Übersicht: docs/utils/polylines
|
||||
|
||||
- [contextMenu](contextMenu.md)
|
||||
- [eventHandlers](eventHandlers.md)
|
||||
- [monitorContextMenu](monitorContextMenu.md)
|
||||
- [polylineSubscription](polylineSubscription.md)
|
||||
- [redrawPolyline](redrawPolyline.md)
|
||||
- [setupPolylines](setupPolylines.md)
|
||||
@@ -6,5 +6,11 @@ Funktionen zum Steuern des Polyline-Kontextmenüs (Schließen, Zurücksetzen, et
|
||||
|
||||
## exportierte Funktionen
|
||||
|
||||
- `closePolylineSelectionAndContextMenu(map)`: Setzt Polyline-Auswahl zurück und schließt das Kontextmenü
|
||||
- `monitorContextMenu(map)`: Überwacht via `localStorage`, ob das Menü automatisch geschlossen werden soll
|
||||
- `closePolylineSelectionAndContextMenu(map)`: Setzt Polyline-Auswahl zurück und schließt das
|
||||
Kontextmenü
|
||||
- `monitorContextMenu(map)`: Überwacht via `localStorage`, ob das Menü automatisch geschlossen
|
||||
werden soll
|
||||
|
||||
---
|
||||
|
||||
[Zurück zur Übersicht](../../README.md)
|
||||
|
||||
@@ -7,4 +7,8 @@ Bindet Maus-Events an Polylinien (z. B. Hover-Effekte).
|
||||
## exportierte Funktionen
|
||||
|
||||
- `enablePolylineEvents(polylines, lineColors)`
|
||||
- `disablePolylineEvents(polylines)`
|
||||
- `disablePolylineEvents(polylines)`
|
||||
|
||||
---
|
||||
|
||||
[Zurück zur Übersicht](../../README.md)
|
||||
|
||||
@@ -7,4 +7,8 @@ Erweiterte Überwachung des Kontextmenüs über `localStorage`.
|
||||
## Funktion
|
||||
|
||||
- Importiert `closePolylineSelectionAndContextMenu`
|
||||
- Ruft regelmäßig `setTimeout` auf, um `contextMenuExpired` zu prüfen
|
||||
- Ruft regelmäßig `setTimeout` auf, um `contextMenuExpired` zu prüfen
|
||||
|
||||
---
|
||||
|
||||
[Zurück zur Übersicht](../../README.md)
|
||||
|
||||
@@ -7,4 +7,8 @@ Abonnement auf den Redux-Store, um auf `forceClose` im Kontextmenü zu reagieren
|
||||
## Verhalten
|
||||
|
||||
- Erkennt `polylineContextMenu.forceClose`
|
||||
- Ruft `contextmenu.hide()` auf und resetet Redux-Status
|
||||
- Ruft `contextmenu.hide()` auf und resetet Redux-Status
|
||||
|
||||
---
|
||||
|
||||
[Zurück zur Übersicht](../../README.md)
|
||||
|
||||
@@ -7,8 +7,12 @@ Zeichnet eine Polyline mit neuen Koordinaten und Tooltip neu.
|
||||
## Funktion
|
||||
|
||||
```js
|
||||
redrawPolyline(lineData, lineColors, tooltipContents, map)
|
||||
redrawPolyline(lineData, lineColors, tooltipContents, map);
|
||||
```
|
||||
|
||||
- Entfernt vorherige Polyline
|
||||
- Erstellt neue mit Tooltip und Hover-Effekten
|
||||
- Erstellt neue mit Tooltip und Hover-Effekten
|
||||
|
||||
---
|
||||
|
||||
[Zurück zur Übersicht](../../README.md)
|
||||
|
||||
@@ -4,13 +4,15 @@
|
||||
|
||||
## Zweck
|
||||
|
||||
Diese Datei enthält die zentrale Funktion `setupPolylines`, die in der Kartenkomponente (Leaflet) Polylinien sowie Marker basierend auf Gerätekonfigurationen zeichnet und verwaltet.
|
||||
Diese Datei enthält die zentrale Funktion `setupPolylines`, die in der Kartenkomponente (Leaflet)
|
||||
Polylinien sowie Marker basierend auf Gerätekonfigurationen zeichnet und verwaltet.
|
||||
|
||||
Sie wird verwendet, um:
|
||||
|
||||
- Polylinien basierend auf Koordinaten zu zeichnen
|
||||
- Stützpunkte visuell als Marker anzuzeigen
|
||||
- Marker kontextsensitiv mit Optionen (z. B. „Stützpunkt entfernen“, „Koordinaten anzeigen“) auszustatten
|
||||
- Marker kontextsensitiv mit Optionen (z. B. „Stützpunkt entfernen“, „Koordinaten anzeigen“)
|
||||
auszustatten
|
||||
- Linien aktualisieren und neue Koordinaten in die Datenbank schreiben
|
||||
- Kontextmenü-Interaktionen zu ermöglichen
|
||||
|
||||
@@ -29,7 +31,8 @@ Sie wird verwendet, um:
|
||||
## Dynamische URL mit Port-Steuerung
|
||||
|
||||
Die Datei verwendet **keine feste API-Basis-URL** mehr aus `.env.local`.
|
||||
Stattdessen wird `NEXT_PUBLIC_API_PORT_MODE` genutzt, um zwischen Entwicklungs- und Produktionsumgebung zu unterscheiden:
|
||||
Stattdessen wird `NEXT_PUBLIC_API_PORT_MODE` genutzt, um zwischen Entwicklungs- und
|
||||
Produktionsumgebung zu unterscheiden:
|
||||
|
||||
```env
|
||||
NEXT_PUBLIC_API_PORT_MODE=dev
|
||||
@@ -40,7 +43,10 @@ NEXT_PUBLIC_API_PORT_MODE=dev
|
||||
```js
|
||||
const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
|
||||
|
||||
const baseUrl = mode === "dev" ? `${window.location.protocol}//${window.location.hostname}:80/talas5/` : `${window.location.origin}/talas5/`;
|
||||
const baseUrl =
|
||||
mode === "dev"
|
||||
? `${window.location.protocol}//${window.location.hostname}:80/talas5/`
|
||||
: `${window.location.origin}/talas5/`;
|
||||
```
|
||||
|
||||
---
|
||||
@@ -57,7 +63,8 @@ const baseUrl = mode === "dev" ? `${window.location.protocol}//${window.location
|
||||
|
||||
## Speicherorte
|
||||
|
||||
- Polylinien und LineColors werden unter `window.polylines` und `window.lineColors` global gespeichert
|
||||
- Polylinien und LineColors werden unter `window.polylines` und `window.lineColors` global
|
||||
gespeichert
|
||||
- Aktive Redux-Slices:
|
||||
- `polylineContextMenuSlice`
|
||||
- `addPoiOnPolylineSlice`
|
||||
@@ -74,3 +81,7 @@ const baseUrl = mode === "dev" ? `${window.location.protocol}//${window.location
|
||||
---
|
||||
|
||||
📄 Pfad: `/docs/frontend/utils/polylines/setupPolylines.md`
|
||||
|
||||
---
|
||||
|
||||
[Zurück zur Übersicht](../../README.md)
|
||||
|
||||
Reference in New Issue
Block a user