bereich.png erstellt und bei editMode active marker.setZIndexOffset(1000);

This commit is contained in:
ISA
2024-12-20 08:10:45 +01:00
parent 2adca70ba5
commit 38b43cbe48
6 changed files with 148 additions and 2 deletions

View File

@@ -0,0 +1,27 @@
export const updateLocation = async (idLocation, idMap, newCoords) => {
try {
const response = await fetch("/api/updateBereich", {
method: "PUT",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
idLocation,
idMap,
x: newCoords.x,
y: newCoords.y,
}),
});
if (!response.ok) {
throw new Error("Fehler beim Aktualisieren der Koordinaten");
}
const data = await response.json();
console.log("Koordinaten erfolgreich aktualisiert:", data);
return data;
} catch (error) {
console.error("Fehler beim Aufruf von updateLocation:", error);
throw error;
}
};