alle graue importe von MapComponent.js entfernt

This commit is contained in:
ISA
2024-12-10 07:11:14 +01:00
parent b68a80754b
commit 8db65949e7
3 changed files with 3 additions and 80 deletions

View File

@@ -1,50 +0,0 @@
/* // hooks/useLteModemMarkersLayer.js das ist GSM Modem
import { useEffect, useState } from "react";
import L from "leaflet";
import { createAndSetDevices } from "../../utils/createAndSetDevices";
import { addContextMenuToMarker } from "../../utils/addContextMenuToMarker";
import { checkOverlappingMarkers } from "../../utils/mapUtils";
const useLteModemMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
const [lteModemMarkers, setLteModemMarkers] = useState([]);
useEffect(() => {
if (GisSystemStatic && GisSystemStatic.length && map) {
createAndSetDevices(10, setLteModemMarkers, GisSystemStatic, priorityConfig); // LTE Modems
}
}, [GisSystemStatic, map, priorityConfig]);
useEffect(() => {
if (map && lteModemMarkers.length) {
lteModemMarkers.forEach((marker) => {
marker.addTo(map);
oms.addMarker(marker);
// Popup on mouseover and mouseout
marker.on("mouseover", function () {
this.openPopup();
});
marker.on("mouseout", function () {
this.closePopup();
});
addContextMenuToMarker(marker);
});
// Disable map context menu
map.options.contextmenu = false;
map.options.contextmenuItems = [];
oms.map.options.contextmenu = false;
oms.map.options.contextmenuItems = [];
// Call the function to check for overlapping markers
checkOverlappingMarkers(oms, map);
}
}, [map, lteModemMarkers]);
return lteModemMarkers;
};
export default useLteModemMarkersLayer;
*/

View File

@@ -12,6 +12,7 @@ const useTkComponentsMarkersLayer = (map, oms, GisSystemStatic, priorityConfig)
if (GisSystemStatic && GisSystemStatic.length && map) {
createAndSetDevices(2, setTkComponentsMarkers, GisSystemStatic, priorityConfig); // ECI-System
}
GisSystemStatic.filter((system) => system.IdSystem === 30).forEach((station) => console.log("Koordinaten für TK-Komponenten wird von hier nie aufgerufen:", station.Latitude, station.Longitude));
}, [GisSystemStatic, map, priorityConfig]);
useEffect(() => {