feat: Fix Redux-Datenstruktur für GisStationsStaticDistrict und Bereichs-Dropdown
- `GisStationsStaticDistrict` wird jetzt korrekt aus Redux gelesen und verwendet `Points` als Array.
- Fehler `find is not a function` behoben durch Zugriff auf `GisStationsStaticDistrict.Points`.
- Sicherstellung, dass `Points` existiert, bevor darauf zugegriffen wird.
- Konsole-Logs für Debugging hinzugefügt, um leere oder ungültige Daten zu erkennen.
- Bereichsauswahl im Dropdown funktioniert jetzt korrekt und fliegt zur gewählten Station auf der Karte.
✅ Tested: Dropdown zeigt jetzt die `Area_Name`-Werte und `map.flyTo()` funktioniert korrekt.
This commit is contained in:
@@ -8,11 +8,11 @@ export async function fetchGisSystemStatic() {
|
||||
const idMap = params.get("idMap") || process.env.NEXT_PUBLIC_DEFAULT_ID_MAP || "12";
|
||||
const idUser = params.get("idUser") || process.env.NEXT_PUBLIC_DEFAULT_ID_USER || "484";
|
||||
|
||||
console.log("🔍 fetchGisSystemStatic - URL:", `${apiBaseUrl}/GisSystemStatic?idMap=${idMap}&idUser=${idUser}`);
|
||||
//console.log("🔍 fetchGisSystemStatic - URL:", `${apiBaseUrl}/GisSystemStatic?idMap=${idMap}&idUser=${idUser}`);
|
||||
|
||||
const response = await fetch(`${apiBaseUrl}/GisSystemStatic?idMap=${idMap}&idUser=${idUser}`);
|
||||
const data = await response.json();
|
||||
|
||||
console.log("✅ fetchGisSystemStatic - Daten:", data);
|
||||
//console.log("✅ fetchGisSystemStatic - Daten:", data);
|
||||
return data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user