Fix: Markers Popup Formatierung

This commit is contained in:
ISA
2024-05-08 11:37:36 +02:00
parent 7d253a2f53
commit 3c3c2c86a6

View File

@@ -328,7 +328,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
const getIdSystemAndAllowValueMap = new Map( const getIdSystemAndAllowValueMap = new Map(
GisSystemStatic.map((system) => [system.IdSystem, system.Allow]) GisSystemStatic.map((system) => [system.IdSystem, system.Allow])
); );
console.log("getIdSystemAndAllowValueMap:", getIdSystemAndAllowValueMap); //console.log("getIdSystemAndAllowValueMap:", getIdSystemAndAllowValueMap);
if (jsonResponse.Points && statusResponse.Statis) { if (jsonResponse.Points && statusResponse.Statis) {
const statisMap = new Map( const statisMap = new Map(
@@ -384,10 +384,10 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
marker.bindPopup(` marker.bindPopup(`
<div class=" bg-white rounded-lg "> <div class=" bg-white rounded-lg ">
<h3 class="text-lg font-semibold text-gray-900">${station.LD_Name}</h3> <p class="text-lg font-semibold text-gray-900">${station.LD_Name}</p>
<p class="text-gray-800"><strong>Gerät:</strong> ${station.Device}</p> <span class="text-md font-bold text-gray-800"> ${station.Device}</span><br>
<p class="text-gray-800"><strong>Zone:</strong> ${station.Area_Short} (${station.Area_Name})</p> <span class="text-gray-800"><strong> ${station.Area_Short} </strong>(${station.Area_Name})</span><br>
<p class="text-gray-800"><strong>Standort:</strong> ${station.Location_Short} (${station.Location_Name})</p> <span class="text-gray-800"><strong>${station.Location_Short} </strong> (${station.Location_Name})</span>
<div class="mt-2">${statusInfo}</div> <div class="mt-2">${statusInfo}</div>
</div> </div>
`); `);
@@ -725,7 +725,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
// Effekt zum Loggen der poiTypData, wenn sie sich ändern // Effekt zum Loggen der poiTypData, wenn sie sich ändern
useEffect(() => { useEffect(() => {
console.log("poiTypData aktualisiert:", poiTypData); //console.log("poiTypData aktualisiert:", poiTypData);
}, [poiTypData]); }, [poiTypData]);
//--------------------------------------- //---------------------------------------
@@ -740,7 +740,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
data.forEach((item) => map.set(item.idPoiTyp, item.name)); data.forEach((item) => map.set(item.idPoiTyp, item.name));
setPoiTypMap(map); setPoiTypMap(map);
setIsPoiTypLoaded(true); // Daten wurden erfolgreich geladen setIsPoiTypLoaded(true); // Daten wurden erfolgreich geladen
console.log("poiTypMap:", map); //console.log("poiTypMap:", map);
const poiTypName = poiTypMap.get(0) || "Unbekannt"; const poiTypName = poiTypMap.get(0) || "Unbekannt";
//console.log("poiTypName:", poiTypName); //console.log("poiTypName:", poiTypName);
} catch (error) { } catch (error) {