fix: Automatische Aktualisierung von Spiderfy/Unspiderfy im Intervall

- `map.fire("click")` im `setInterval()` hinzugefügt, um Linien sofort auszublenden
- Spiderfy/Unspiderfy wird nun regelmäßig aktualisiert, ohne manuelles Klicken
- Debugging-Log hinzugefügt, um Klick-Event zu überwachen
This commit is contained in:
Ismail Ali
2025-03-09 18:46:38 +01:00
parent 58d0f1a8a7
commit 6f47709256
3 changed files with 36 additions and 12 deletions

View File

@@ -868,7 +868,12 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
// Setze ein Intervall für regelmäßige Updates
const intervalId = setInterval(() => {
updateAllMarkers();
}, 20000); // 20 Sekunden
if (map) {
console.log("🔥 Automatischer Klick-Event ausgelöst, um Spiderfy zu aktualisieren.");
map.fire("click");
}
}, 20000);
// Aufräumen bei Komponentenentladung
return () => {