- `index.js` als Client-Komponente deklariert (`"use client"`) zur Vermeidung von SSR-Problemen.
- `useEffect` optimiert, um unendliche API-Requests durch `isMounted`-Check zu verhindern.
- `loadData()` angepasst, um API-Fehler korrekt abzufangen und erneute Ladeversuche zu vermeiden.
- Doppelte Registrierung von `poiReadFromDbTriggerAtom` durch HMR verhindert.
- Ungültige MySQL-Option `acquireTimeout` entfernt, um Verbindungsfehler zu beheben.
Diese Änderungen verhindern unerwartete Reloads und verbessern die Stabilität der Anwendung.
- Protokoll und Hostname dynamisch über window.location abgeleitet.
- Basis-URL auf /talas5/devices/ angepasst.
- Unterstützt flexible Umgebungskonfiguration (z. B. Entwicklungs- und Produktionsumgebungen).
- Ursache des Problems: Inkonsistenz bei der Benennung des Layers in `useLayerVisibility` ("SMSFunkmodem" vs. "SMSModem").
- Anpassung des Layer-Namens in `useLayerVisibility`, um mit der `GisSystemStatic`-Datenstruktur und `mapLayersVisibility` übereinzustimmen.
- Konflikt führte dazu, dass der SMS Modem-Layer nicht korrekt sichtbar/unsichtbar geschaltet wurde.
- Debugging und Anpassungen führten zur erfolgreichen Behebung des Fehlers.
Dieser Fix stellt sicher, dass die Sichtbarkeit der Marker-Layer konsistent und wie erwartet funktioniert.
- Created mock API route for fetching GIS lines data (/api/talas_v5_DB/gisLines/readGisLinesMock)
- Created mock API route for fetching station names data (/api/talas_v5_DB/station/getAllStationsNamesMock)
- Replaced original API calls in useLineData hook with mock routes for development and testing
- Added try-catch block in MapComponent.js to handle errors during fetch operation
- Added try-catch block in API route to handle errors during database query
This improves the robustness and error tolerance of the application by ensuring errors are properly caught and logged.
feat: Implement dynamic line coloring based on module IDs
Enhanced the map visualization by implementing dynamic line coloring, assigning unique colors to polyline elements based on their corresponding module IDs. This update fetches color settings from the linesColorAPI and applies them to the line drawings on the map. The change aims to improve the visual distinction between different lines, facilitating easier identification and analysis for users.