Kleiner Kreis mit Tailwind in Popup erstellen für die Meldungen

This commit is contained in:
ISA
2024-04-17 08:40:39 +02:00
parent 4a586cccc3
commit 7789de40ec

View File

@@ -699,9 +699,13 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
); );
let additionalInfo = ""; let additionalInfo = "";
// Alle gefundenen Me-Werte zu einem String hinzufügen // Umdrehen der Reihenfolge der Statusmeldungen
matchingStatuses.forEach((status) => { matchingStatuses.reverse().forEach((status) => {
additionalInfo += `<br>${status.Me} ( <span style="color: ${status.Co};">${status.Na}</span>) `; additionalInfo += `
<div class="flex items-center my-1">
<div class="w-2 h-2 mr-2 inline-block rounded-full" style="background-color: ${status.Co};"></div>
${status.Me}&nbsp;<span style="color: ${status.Co};">(${status.Na})</span>
</div>`;
}); });
const marker = L.marker([station.X, station.Y], { const marker = L.marker([station.X, station.Y], {