Station-Marker-Popup-Meldung-Status einfärben mit der Wert in Co Attribute

This commit is contained in:
ISA
2024-04-17 08:05:39 +02:00
parent e8412f3dc3
commit 4a586cccc3

View File

@@ -701,7 +701,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
// Alle gefundenen Me-Werte zu einem String hinzufügen // Alle gefundenen Me-Werte zu einem String hinzufügen
matchingStatuses.forEach((status) => { matchingStatuses.forEach((status) => {
additionalInfo += `<br>${status.Me} (${status.Na}) `; additionalInfo += `<br>${status.Me} ( <span style="color: ${status.Co};">${status.Na}</span>) `;
}); });
const marker = L.marker([station.X, station.Y], { const marker = L.marker([station.X, station.Y], {
@@ -724,7 +724,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
marker marker
.bindPopup( .bindPopup(
`<b>${station.LD_Name}</b><br>${station.Device}<br>${station.Area_Short} ${station.Area_Name}<br>${station.Location_Short} ${station.Location_Name}${additionalInfo}<br><br>` `<b>${station.LD_Name}</b><br>${station.Device}<br>${station.Area_Short} (${station.Area_Name})<br>${station.Location_Short} (${station.Location_Name}) <br>${additionalInfo}<br><br>`
) )
.openPopup(); .openPopup();
}); });