diff --git a/components/PoiUtils.js b/components/PoiUtils.js deleted file mode 100644 index 772bbabdf..000000000 --- a/components/PoiUtils.js +++ /dev/null @@ -1,53 +0,0 @@ -//components/PoiUtils.js -import L from "leaflet"; - -// Funktion, um POI Markers zu erstellen -export const createPoiMarkers = (poiData, iconPath) => { - return poiData.map((location) => { - return L.marker([location.latitude, location.longitude], { - icon: L.icon({ - iconUrl: iconPath, - iconSize: [25, 41], - iconAnchor: [12, 41], - popupAnchor: [1, -34], - draggable: true, - }), - id: location.idPoi, - }); - }); -}; - -// Funktion zum Hinzufügen von Markern zur Karte und zum Umgang mit Events -export const addMarkersToMap = (markers, map, layerGroup) => { - markers.forEach((marker) => { - marker.addTo(layerGroup); - marker.on("mouseover", () => marker.openPopup()); - marker.on("mouseout", () => marker.closePopup()); - marker.on("dragend", (e) => { - console.log("Marker wurde verschoben in addMarkersToMap"); - const newLat = e.target.getLatLng().lat; - const newLng = e.target.getLatLng().lng; - const markerId = e.target.options.id; - updateLocationInDatabase(markerId, newLat, newLng); - }); - }); -}; - -// Funktion zum Aktualisieren der Standorte in der Datenbank -export const updateLocationInDatabase = async (id, newLatitude, newLongitude) => { - const response = await fetch("/api/talas_v5_DB/pois/updateLocation", { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - id, - latitude: newLatitude, - longitude: newLongitude, - }), - }); - - if (!response.ok) { - console.error("Fehler beim Aktualisieren der Position"); - } -}; - -// Weitere Funktionen können hier hinzugefügt werden diff --git a/components/pois/PoiUtils.js b/components/pois/PoiUtils.js deleted file mode 100644 index 9275f95f1..000000000 --- a/components/pois/PoiUtils.js +++ /dev/null @@ -1,53 +0,0 @@ -// components/pois/PoiUtils.js -import L from "leaflet"; - -// Funktion, um POI Markers zu erstellen -export const createPoiMarkers = (poiData, iconPath) => { - return poiData.map((location) => { - return L.marker([location.latitude, location.longitude], { - icon: L.icon({ - iconUrl: iconPath, - iconSize: [25, 41], - iconAnchor: [12, 41], - popupAnchor: [1, -34], - draggable: true, - }), - id: location.idPoi, - }); - }); -}; - -// Funktion zum Hinzufügen von Markern zur Karte und zum Umgang mit Events -export const addMarkersToMap = (markers, map, layerGroup) => { - markers.forEach((marker) => { - marker.addTo(layerGroup); - marker.on("mouseover", () => marker.openPopup()); - marker.on("mouseout", () => marker.closePopup()); - marker.on("dragend", (e) => { - console.log("Marker wurde verschoben in addMarkersToMap"); - const newLat = e.target.getLatLng().lat; - const newLng = e.target.getLatLng().lng; - const markerId = e.target.options.id; - updateLocationInDatabase(markerId, newLat, newLng); - }); - }); -}; - -// Funktion zum Aktualisieren der Standorte in der Datenbank -export const updateLocationInDatabase = async (id, newLatitude, newLongitude) => { - const response = await fetch("/api/talas_v5_DB/pois/updateLocation", { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - id, - latitude: newLatitude, - longitude: newLongitude, - }), - }); - - if (!response.ok) { - console.error("Fehler beim Aktualisieren der Position"); - } -}; - -// Weitere Funktionen können hier hinzugefügt werden diff --git a/config/appVersion.js b/config/appVersion.js index 80bddb66d..a3a9bd648 100644 --- a/config/appVersion.js +++ b/config/appVersion.js @@ -1,2 +1,2 @@ // /config/appVersion -export const APP_VERSION = "1.1.119"; +export const APP_VERSION = "1.1.120";