git commit -m "fix: Station öffnen im Kontextmenü für POIs deaktiviert"
This commit is contained in:
@@ -84,6 +84,7 @@ import useInitializeMap from "./hooks/useInitializeMap";
|
||||
import useLoadUserRights from "./hooks/useLoadUserRights";
|
||||
import useFetchWebServiceMap from "./hooks/useFetchWebServiceMap";
|
||||
import useFetchPoiData from "./hooks/useFetchPoiData.js";
|
||||
import useRestoreMapSettings from "./hooks/useRestoreMapSettings";
|
||||
|
||||
const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
const dispatch = useDispatch();
|
||||
@@ -292,15 +293,14 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
}, []);
|
||||
|
||||
//--------------------------------------------
|
||||
//const poiData = useFetchPoiData("/api/talas_v5_DB/pois/poi-icons");
|
||||
const [poiData, setPoiData] = useState([]);
|
||||
// POIs Popup Informationen anzeigen
|
||||
useFetchPoiData(setPoiTypMap, setPoiData);
|
||||
|
||||
useEffect(() => {
|
||||
//Test in useEffect
|
||||
/* useEffect(() => {
|
||||
console.log("📌 POI-Typ Map in MapComponent:", poiTypMap);
|
||||
console.log("📌 POI-Daten in MapComponent:", poiData);
|
||||
}, [poiTypMap, poiData]);
|
||||
}, [poiTypMap, poiData]); */
|
||||
|
||||
//--------------------------------------------
|
||||
// POIs auf die Karte zeichnen
|
||||
@@ -502,8 +502,11 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
|
||||
//--------------------------------------------
|
||||
//--------------------------------------------
|
||||
useRestoreMapSettings(map);
|
||||
//Test in useEffect
|
||||
useEffect(() => {
|
||||
if (map) {
|
||||
console.log("🗺️ Map-Einstellungen werden wiederhergestellt...");
|
||||
restoreMapSettings(map);
|
||||
}
|
||||
}, [map]);
|
||||
|
||||
Reference in New Issue
Block a user