Rename loadStore.js to readPoiMarkersStore.js

This commit is contained in:
ISA
2024-05-03 13:58:02 +02:00
parent 39e5e1cb5a
commit 0448d1bc56
5 changed files with 11 additions and 10 deletions

View File

@@ -573,7 +573,8 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
// Popup binden, aber nicht automatisch öffnen
marker.bindPopup(
`<b>${location.description || "Unbekannt"}</b><br>Type: ${location.idPoiTyp || "N/A"}<br>Lat: ${latitude.toFixed(5)}, Lng: ${longitude.toFixed(5)}`
//N/A oder location.idPoiTyp=0 hier soll der Name von poiTyp Tabelle kommen, also foreign key
`<b>${location.description || "Unbekannt"}</b><br>Type: ${location.idPoiTyp || "N/A oder location.idPoiTyp=0"}<br>Lat: ${latitude.toFixed(5)}, Lng: ${longitude.toFixed(5)}`
);
// Event-Handler für Mouseover und Mouseout hinzufügen

View File

@@ -2,9 +2,9 @@
import React, { useState, useEffect } from "react";
import ReactDOM from "react-dom";
import { useRecoilValue } from "recoil";
import { loadDataStore } from "../store/selectors/loadDataStore";
import { readPoiMarkersStore } from "../store/selectors/readPoiMarkersStore";
const ShowAddStationPopup = ({ map, latlng }) => {
const loadData = useRecoilValue(loadDataStore);
const loadData = useRecoilValue(readPoiMarkersStore);
const [poiTypData2, setPoiTypData2] = useState(); // Recoil State verwenden
const [name, setName] = useState("");
const [poiTypeId, setPoiTypeId] = useState(""); // Initialize as string