diff --git a/.env.local b/.env.local index 3b42bf1ae..290bb00ee 100644 --- a/.env.local +++ b/.env.local @@ -7,7 +7,6 @@ DB_NAME=talas_v5 DB_PORT=3306 # Public Settings (Client braucht IP/Domain) , Variablen mit dem Präfix "NEXT_PUBLIC" ist in Browser sichtbar -NEXT_PUBLIC_ENABLE_GEOCODER=true NEXT_PUBLIC_USE_MOCK_API=false NEXT_PUBLIC_DEBUG_LOG=true diff --git a/components/features/GeocoderFeature.js b/components/features/GeocoderFeature.js deleted file mode 100644 index 25d0b8a43..000000000 --- a/components/features/GeocoderFeature.js +++ /dev/null @@ -1,49 +0,0 @@ -// components/features/GeocoderFeature.js -export function initGeocoderFeature(map) { - // Feature Toggle - const isGeocoderEnabled = process.env.NEXT_PUBLIC_ENABLE_GEOCODER === "true"; - - if (!isGeocoderEnabled) return; // Falls deaktiviert, nichts ausführen - - // Benutzerdefiniertes Icon erstellen - const customIcon = L.icon({ - iconUrl: "/img/marker-icon.png", - iconSize: [32, 32], - iconAnchor: [16, 32], - popupAnchor: [0, -32], - }); - - // Geocoder hinzufügen - const geocoder = L.Control.geocoder({ - position: "topleft", - defaultMarkGeocode: false, - errorMessage: "", // Keine Fehlermeldung anzeigen - geocoder: new L.Control.Geocoder.Nominatim({ - serviceUrl: "https://nominatim.openstreetmap.org/", - geocodingQueryParams: { - "accept-language": "de", - countrycodes: "DE", - }, - }), - }) - .on("markgeocode", function (e) { - const latlng = e.geocode.center; - map.setView(latlng, 15); - L.marker(latlng, { icon: customIcon }).addTo(map).bindPopup(e.geocode.name).openPopup(); - }) - .addTo(map); - - // Styling mit Tailwind CSS - setTimeout(() => { - const geocoderContainer = document.querySelector(".leaflet-control-geocoder"); - if (geocoderContainer) { - geocoderContainer.classList.add("shadow-md", "border", "border-gray-300", "rounded-full", "bg-white", "p-2", "w-96"); - - const geocoderInput = geocoderContainer.querySelector("input"); - if (geocoderInput) { - geocoderInput.classList.add("border-none", "outline-none", "w-full", "text-sm", "text-gray-700", "pl-3"); - geocoderInput.placeholder = "Ort oder Adresse suchen..."; - } - } - }, 100); -} diff --git a/components/mainComponent/MapComponent.js b/components/mainComponent/MapComponent.js index 309f283a6..9ee654855 100644 --- a/components/mainComponent/MapComponent.js +++ b/components/mainComponent/MapComponent.js @@ -35,7 +35,6 @@ import useLineData from "../../hooks/useLineData.js"; //import { useCreateAndSetDevices } from "../hooks/useCreateAndSetDevices"; import { useMapComponentState } from "../../hooks/useMapComponentState.js"; import { updateLocation } from "../../utils/updateBereichUtil.js"; -import { initGeocoderFeature } from "../features/GeocoderFeature.js"; //-------------------------------------------- //import { currentPoiState } from "../redux/slices/currentPoiSlice.js"; diff --git a/config/appVersion.js b/config/appVersion.js index 9fb063a3b..07c809d4c 100644 --- a/config/appVersion.js +++ b/config/appVersion.js @@ -1,2 +1,2 @@ // /config/appVersion -export const APP_VERSION = "1.1.79"; +export const APP_VERSION = "1.1.80";