muss noch für update der Bereich Marker gearbeitet werden
This commit is contained in:
@@ -174,17 +174,6 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
});
|
||||
const [polylineEventsDisabled, setPolylineEventsDisabled] = useRecoilState(polylineEventsDisabledState); // Recoil State
|
||||
|
||||
const handleLocationUpdate = async (idLocation, idMap, newCoords) => {
|
||||
try {
|
||||
const result = await updateLocation(idLocation, idMap, newCoords);
|
||||
console.log("Erfolgreiche Aktualisierung:", result);
|
||||
|
||||
// Aktualisieren Sie Marker oder andere Elemente
|
||||
} catch (error) {
|
||||
console.error("Fehler beim Aktualisieren der Location:", error);
|
||||
}
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------
|
||||
|
||||
/* useEffect(() => {
|
||||
@@ -805,7 +794,17 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
const bereichUrl = `http://${hostname}:${port}/api/talas_v5_DB/bereich/readBereich?m=${mValue}`; // Dynamischer Hostname und Port
|
||||
|
||||
// Bereichs-Marker basierend auf dynamischer URL laden
|
||||
const bereicheMarkers = useBereicheMarkersLayer(map, oms, bereichUrl);
|
||||
const handleLocationUpdate = async (idLocation, idMap, newCoords) => {
|
||||
try {
|
||||
const result = await updateLocation(idLocation, idMap, newCoords); // Update-API
|
||||
console.log("Koordinaten erfolgreich aktualisiert:", result);
|
||||
} catch (error) {
|
||||
console.error("Fehler beim Aktualisieren der Location:", error);
|
||||
}
|
||||
};
|
||||
|
||||
// Bereichs-Marker basierend auf dynamischer URL laden
|
||||
const bereicheMarkers = useBereicheMarkersLayer(map, oms, bereichUrl, handleLocationUpdate);
|
||||
//const bereicheMarkers = useBereicheMarkersLayer(map, oms, editMode ? `/api/talas_v5_DB/bereich/readBereich?editMode=true` : `/api/talas_v5_DB/bereich/readBereich`);
|
||||
//const bereicheMarkers = useBereicheMarkersLayer(map, oms, "/api/talas_v5_DB/bereich/readBereich?m=12");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user