POI hinzufügen statt Station hinzufügen im Konext Menü und im Button
This commit is contained in:
@@ -210,7 +210,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
||||
loadData();
|
||||
};
|
||||
|
||||
// Kontextmenü Callback für "Station hinzufügen"
|
||||
// Kontextmenü Callback für "POI hinzufügen"
|
||||
const addStationCallback = (event) => {
|
||||
setPopupCoordinates(event.latlng); // Koordinaten des Klicks verwenden
|
||||
setShowPopup(true); // Popup öffnen
|
||||
@@ -240,7 +240,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
||||
},
|
||||
"-", // Divider
|
||||
{
|
||||
text: "Station hinzufügen",
|
||||
text: "POI hinzufügen",
|
||||
icon: "img/add_station.png",
|
||||
className: "background-red",
|
||||
callback: addStationCallback,
|
||||
@@ -748,7 +748,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
||||
// Rufe hier Funktionen auf, die eine initialisierte Karte benötigen.
|
||||
});
|
||||
}
|
||||
console.log("trigger in MapComponent.js:", poiReadTrigger);
|
||||
//console.log("trigger in MapComponent.js:", poiReadTrigger);
|
||||
}, [mapRef, map, poiReadTrigger]); // Prüfe die Abhängigkeiten sorgfältig
|
||||
|
||||
// poiTyp Daten hinzufügen
|
||||
@@ -765,10 +765,10 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
||||
console.error("Fehler beim Abrufen der poiTyp Daten:", error);
|
||||
}
|
||||
};
|
||||
console.log(
|
||||
/* console.log(
|
||||
"trigger in MapComponent.js in fetchPoiTypData:",
|
||||
poiReadTrigger
|
||||
);
|
||||
); */
|
||||
fetchPoiTypData();
|
||||
}, []);
|
||||
|
||||
@@ -1615,12 +1615,11 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
||||
}, [map, zoomTrigger]);
|
||||
|
||||
//---------------------------------------------------------
|
||||
useEffect(() => {
|
||||
console.log("Aktualisierung in MapComponent.js:", poiReadTrigger);
|
||||
|
||||
/* useEffect(() => {
|
||||
//console.log("Aktualisierung in MapComponent.js:", poiReadTrigger);
|
||||
// Logik zur Aktualisierung der Map hier hinzufügen
|
||||
// Beispiel: Daten neu laden oder aktualisieren
|
||||
}, [poiReadTrigger]);
|
||||
}, [poiReadTrigger]); */
|
||||
//---------------------------------------------------------
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user