From d166b2468de81d421016eed374ed5b9a85944a51 Mon Sep 17 00:00:00 2001 From: ISA Date: Mon, 15 Sep 2025 13:38:19 +0200 Subject: [PATCH] feat: AreaDropdown separate from MapLayerControlPanel --- .env.development | 2 +- .env.production | 2 +- components/mainComponent/MapComponent.js | 8 +- components/uiWidgets/AreaDropdown.js | 79 +++++++++++++++++++ .../MapLayersControlPanel.js | 49 +++++++++--- package-lock.json | 4 +- package.json | 2 +- 7 files changed, 129 insertions(+), 17 deletions(-) create mode 100644 components/uiWidgets/AreaDropdown.js diff --git a/.env.development b/.env.development index 830c7431c..07a97f8ba 100644 --- a/.env.development +++ b/.env.development @@ -23,4 +23,4 @@ NEXT_PUBLIC_USE_MOCKS=true # z.B. http://10.10.0.13/xyz/index.aspx -> basePath in config.json auf /xyz setzen # basePath wird jetzt in public/config.json gepflegt # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.1.365 +NEXT_PUBLIC_APP_VERSION=1.1.366 diff --git a/.env.production b/.env.production index 6b8fbbcb5..e8110dc88 100644 --- a/.env.production +++ b/.env.production @@ -24,4 +24,4 @@ NEXT_PUBLIC_USE_MOCKS=false # basePath wird jetzt in public/config.json gepflegt # App-Versionsnummer -NEXT_PUBLIC_APP_VERSION=1.1.365 +NEXT_PUBLIC_APP_VERSION=1.1.366 diff --git a/components/mainComponent/MapComponent.js b/components/mainComponent/MapComponent.js index cb363d433..e231694d3 100644 --- a/components/mainComponent/MapComponent.js +++ b/components/mainComponent/MapComponent.js @@ -34,6 +34,7 @@ import CoordinatePopup from "@/components/contextmenu/CoordinatePopup.js"; import MapLayersControlPanel from "@/components/uiWidgets/mapLayersControlPanel/MapLayersControlPanel.js"; import CoordinateInput from "@/components/uiWidgets/CoordinateInput.js"; import VersionInfoModal from "@/components/uiWidgets/VersionInfoModal.js"; +import AreaDropdown from "@/components/uiWidgets/AreaDropdown"; //----------Daten aus API-------------------- import { fetchPoiDataService } from "@/services/database/pois/fetchPoiDataByIdService.js"; import AddPOIModal from "@/components/pois/AddPOIModal.js"; @@ -164,6 +165,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { const [showVersionInfoModal, setShowVersionInfoModal] = useState(false); const [poiTypMap, setPoiTypMap] = useState(new Map()); const [showPopup, setShowPopup] = useState(false); + const [showAreaDropdown, setShowAreaDropdown] = useState(false); const poiLayerRef = useRef(null); // Referenz auf die Layer-Gruppe für Datenbank-Marker const mapRef = useRef(null); // Referenz auf das DIV-Element der Karte const [map, setMap] = useState(null); // Zustand der Karteninstanz @@ -1133,7 +1135,8 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { {GisStationsStaticDistrict && GisStationsStaticDistrict.Points?.length > 0 && - showLayersPanel && ( + showLayersPanel && + !showAreaDropdown && ( { )} {/* Marker-Icon (line-md) */} + {showAreaDropdown && setShowAreaDropdown(false)} />} {/*Lupe: Koordinatensuche ein-/ausblenden */}