feat(map): OMS (OverlappingMarkerSpiderfier) vollständig integriert
- Marker werden nun korrekt bei OMS registriert - Klick auf Plus-Icon spiderfied überlappende Marker - useDynamicDeviceLayers um oms erweitert - checkOverlappingMarkers optimiert für dynamische Marker-Gruppen - Fehlerbehandlung für ungültige Marker-Typen ergänzt
This commit is contained in:
@@ -488,14 +488,14 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
}, [areaMarkers, map]);
|
||||
|
||||
//----------------------------------
|
||||
const { markerStates, layerRefs } = useDynamicDeviceLayers(map, GisSystemStatic, mapLayersVisibility, priorityConfig);
|
||||
const { markerStates, layerRefs } = useDynamicDeviceLayers(map, GisSystemStatic, mapLayersVisibility, priorityConfig, oms);
|
||||
useEffect(() => {
|
||||
const handleVisibilityChange = () => {
|
||||
if (!map) return;
|
||||
|
||||
const allMarkers = Object.values(markerStates).filter(Array.isArray).flat();
|
||||
|
||||
checkOverlappingMarkers(map, allMarkers, plusRoundIcon);
|
||||
checkOverlappingMarkers(map, allMarkers, plusRoundIcon, oms);
|
||||
};
|
||||
|
||||
window.addEventListener("visibilityChanged", handleVisibilityChange);
|
||||
@@ -695,7 +695,14 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
|
||||
checkOverlappingMarkers(map, allMarkers, plusRoundIcon);
|
||||
}, [map, markerStates, mapLayersVisibility]);
|
||||
|
||||
//---------------------------------------------
|
||||
// 🧠 Optional für Debugging für überlappende Markers
|
||||
useEffect(() => {
|
||||
if (oms) {
|
||||
console.log("📌 OMS ready:", oms);
|
||||
window.oms = oms; // Für Debugging global
|
||||
}
|
||||
}, [oms]);
|
||||
//---------------------------------------------
|
||||
//--------------------------------------------
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user