die hooks Layer in den Verzeichnis /hooks/layers verschoben
This commit is contained in:
@@ -40,21 +40,21 @@ import * as layers from "../config/layers.js";
|
||||
import { zoomIn, zoomOut, centerHere } from "../utils/zoomAndCenterUtils.js";
|
||||
import { initializeMap } from "../utils/mapInitialization.js";
|
||||
import { addItemsToMapContextMenu } from "./useMapContextMenu.js";
|
||||
import useGmaMarkersLayer from "../hooks/useGmaMarkersLayer.js"; // Import the custom hook
|
||||
import useTalasMarkersLayer from "../hooks/useTalasMarkersLayer.js"; // Import the custom hook
|
||||
import useEciMarkersLayer from "../hooks/useEciMarkersLayer.js";
|
||||
import useGsmModemMarkersLayer from "../hooks/useGsmModemMarkersLayer.js";
|
||||
import useCiscoRouterMarkersLayer from "../hooks/useCiscoRouterMarkersLayer.js";
|
||||
import useWagoMarkersLayer from "../hooks/useWagoMarkersLayer.js";
|
||||
import useSiemensMarkersLayer from "../hooks/useSiemensMarkersLayer.js";
|
||||
import useOtdrMarkersLayer from "../hooks/useOtdrMarkersLayer.js";
|
||||
import useWdmMarkersLayer from "../hooks/useWdmMarkersLayer.js";
|
||||
import useMessstellenMarkersLayer from "../hooks/useMessstellenMarkersLayer.js";
|
||||
import useTalasiclMarkersLayer from "../hooks/useTalasiclMarkersLayer.js";
|
||||
import useDauzMarkersLayer from "../hooks/useDauzMarkersLayer.js";
|
||||
import useSmsfunkmodemMarkersLayer from "../hooks/useSmsfunkmodemMarkersLayer.js";
|
||||
import useUlafMarkersLayer from "../hooks/useUlafMarkersLayer.js";
|
||||
import useSonstigeMarkersLayer from "../hooks/useSonstigeMarkersLayer.js";
|
||||
import useGmaMarkersLayer from "../hooks/layers/useGmaMarkersLayer.js"; // Import the custom hook
|
||||
import useTalasMarkersLayer from "../hooks/layers/useTalasMarkersLayer.js"; // Import the custom hook
|
||||
import useEciMarkersLayer from "../hooks/layers/useEciMarkersLayer.js";
|
||||
import useGsmModemMarkersLayer from "../hooks/layers/useGsmModemMarkersLayer.js";
|
||||
import useCiscoRouterMarkersLayer from "../hooks/layers/useCiscoRouterMarkersLayer.js";
|
||||
import useWagoMarkersLayer from "../hooks/layers/useWagoMarkersLayer.js";
|
||||
import useSiemensMarkersLayer from "../hooks/layers/useSiemensMarkersLayer.js";
|
||||
import useOtdrMarkersLayer from "../hooks/layers/useOtdrMarkersLayer.js";
|
||||
import useWdmMarkersLayer from "../hooks/layers/useWdmMarkersLayer.js";
|
||||
import useMessstellenMarkersLayer from "../hooks/layers/useMessstellenMarkersLayer.js";
|
||||
import useTalasiclMarkersLayer from "../hooks/layers/useTalasiclMarkersLayer.js";
|
||||
import useDauzMarkersLayer from "../hooks/layers/useDauzMarkersLayer.js";
|
||||
import useSmsfunkmodemMarkersLayer from "../hooks/layers/useSmsfunkmodemMarkersLayer.js";
|
||||
import useUlafMarkersLayer from "../hooks/layers/useUlafMarkersLayer.js";
|
||||
import useSonstigeMarkersLayer from "../hooks/layers/useSonstigeMarkersLayer.js";
|
||||
import handlePoiSelect from "../utils/handlePoiSelect.js";
|
||||
import { fetchGisStationsStaticDistrict, fetchGisStationsStatusDistrict, fetchGisStationsMeasurements, fetchGisSystemStatic } from "../services/fetchData.js";
|
||||
import { setupPolylines } from "../utils/setupPolylines.js";
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// hooks/useCiscoRouterMarkersLayer.js
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { checkOverlappingMarkers } from "../utils/mapUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { checkOverlappingMarkers } from "../../utils/mapUtils";
|
||||
|
||||
const useCiscoRouterMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
const [ciscoRouterMarkers, setCiscoRouterMarkers] = useState([]);
|
||||
@@ -1,8 +1,8 @@
|
||||
// hooks/useDauzMarkersLayer.js
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils";
|
||||
|
||||
const useDauzMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
const [dauzMarkers, setDauzMarkers] = useState([]);
|
||||
@@ -1,8 +1,9 @@
|
||||
// /hooks/layers/useEciMarkersLayer.js
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { checkOverlappingMarkers } from "../utils/mapUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { checkOverlappingMarkers } from "../../utils/mapUtils";
|
||||
|
||||
const useEciMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
const [eciMarkers, setEciMarkers] = useState([]);
|
||||
@@ -1,5 +1,6 @@
|
||||
// /hooks/layers/useGmaMarkersLayer.js
|
||||
import { useEffect } from "react";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
|
||||
const useGmaMarkersLayer = (map, gmaMarkers, GisStationsMeasurements, GMA, oms) => {
|
||||
useEffect(() => {
|
||||
@@ -44,7 +45,7 @@ const useGmaMarkersLayer = (map, gmaMarkers, GisStationsMeasurements, GMA, oms)
|
||||
permanent: true,
|
||||
direction: "auto",
|
||||
offset: [20, 0],
|
||||
},
|
||||
}
|
||||
);
|
||||
|
||||
marker.on("mouseover", function () {
|
||||
@@ -1,9 +1,9 @@
|
||||
// hooks/useGsmModemMarkersLayer.js
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { checkOverlappingMarkers } from "../utils/mapUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { checkOverlappingMarkers } from "../../utils/mapUtils";
|
||||
|
||||
const useGsmModemMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
const [gsmModemMarkers, setGsmModemMarkers] = useState([]);
|
||||
@@ -1,7 +1,8 @@
|
||||
// /hooks/layers/useMessstellenMarkersLayer.js
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils";
|
||||
|
||||
const useMessstellenMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
const [messstellenMarkers, setMessstellenMarkers] = useState([]);
|
||||
@@ -1,8 +1,8 @@
|
||||
// hooks/useOtdrMarkersLayer.js
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils"; // Assuming this function is in markerUtils
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils"; // Assuming this function is in markerUtils
|
||||
|
||||
const useOtdrMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
const [otdrMarkers, setOtdrMarkers] = useState([]);
|
||||
@@ -1,9 +1,9 @@
|
||||
// hooks/useSiemensMarkersLayer.js
|
||||
import { useState, useEffect } from "react";
|
||||
import L from "leaflet";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils";
|
||||
import { checkOverlappingMarkers } from "../utils/mapUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils";
|
||||
import { checkOverlappingMarkers } from "../../utils/mapUtils";
|
||||
|
||||
const useSiemensMarkersLayer = (map, oms, gisSystemStatic, priorityConfig) => {
|
||||
const [siemensMarkers, setSiemensMarkers] = useState([]);
|
||||
@@ -2,7 +2,7 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import "leaflet-contextmenu";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
|
||||
const useSmsfunkmodemMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
const [smsfunkmodemMarkers, setSmsfunkmodemMarkers] = useState([]);
|
||||
@@ -1,8 +1,8 @@
|
||||
// hooks/useSonstigeMarkersLayer.js
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils";
|
||||
|
||||
const useSonstigeMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
const [sonstigeMarkers, setSonstigeMarkers] = useState([]);
|
||||
@@ -3,13 +3,13 @@ import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import "leaflet-contextmenu";
|
||||
import { useRecoilValue } from "recoil";
|
||||
import { mapLayersState } from "../store/atoms/mapLayersState.js";
|
||||
import { selectedAreaState } from "../store/atoms/selectedAreaState.js";
|
||||
import { zoomTriggerState } from "../store/atoms/zoomTriggerState.js";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils.js";
|
||||
import { checkOverlappingMarkers } from "../utils/mapUtils.js";
|
||||
import plusRoundIcon from "../components/PlusRoundIcon.js";
|
||||
import { gisStationsStaticDistrictState } from "../store/atoms/gisStationState.js";
|
||||
import { mapLayersState } from "../../store/atoms/mapLayersState.js";
|
||||
import { selectedAreaState } from "../../store/atoms/selectedAreaState.js";
|
||||
import { zoomTriggerState } from "../../store/atoms/zoomTriggerState.js";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils.js";
|
||||
import { checkOverlappingMarkers } from "../../utils/mapUtils.js";
|
||||
import plusRoundIcon from "../../components/PlusRoundIcon.js";
|
||||
import { gisStationsStaticDistrictState } from "../../store/atoms/gisStationState.js";
|
||||
|
||||
const useTalasMarkers = (map, oms, layers, priorityConfig) => {
|
||||
const [talasMarkers, setTalasMarkers] = useState([]);
|
||||
@@ -36,7 +36,7 @@ const useTalasMarkers = (map, oms, layers, priorityConfig) => {
|
||||
iconSize: [25, 41],
|
||||
iconAnchor: [12, 41],
|
||||
popupAnchor: [1, -34],
|
||||
}),
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { checkOverlappingMarkers } from "../utils/mapUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { checkOverlappingMarkers } from "../../utils/mapUtils";
|
||||
|
||||
const useTalasMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
const [talasMarkers, setTalasMarkers] = useState([]);
|
||||
@@ -1,8 +1,8 @@
|
||||
// hooks/useTalasiclMarkersLayer.js
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils";
|
||||
|
||||
const useTalasiclMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
const [talasiclMarkers, setTalasiclMarkers] = useState([]);
|
||||
@@ -1,7 +1,7 @@
|
||||
// hooks/useUlafMarkersLayer.js
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
//import { fetchDeviceNameById } from "../services/apiService";
|
||||
|
||||
const useUlafMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
@@ -51,7 +51,7 @@ const useUlafMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
${deviceName}<br>
|
||||
${station.description || "Keine Beschreibung"}
|
||||
</div>
|
||||
`,
|
||||
`
|
||||
)
|
||||
.openPopup();
|
||||
});
|
||||
@@ -1,9 +1,9 @@
|
||||
// hooks/useWagoMarkersLayer.js
|
||||
import { useState, useEffect } from "react";
|
||||
import L from "leaflet";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils";
|
||||
import { checkOverlappingMarkers } from "../utils/mapUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils";
|
||||
import { checkOverlappingMarkers } from "../../utils/mapUtils";
|
||||
|
||||
const useWagoMarkersLayer = (map, oms, gisSystemStatic, priorityConfig) => {
|
||||
const [wagoMarkers, setWagoMarkers] = useState([]);
|
||||
@@ -1,8 +1,8 @@
|
||||
// hooks/useWdmMarkersLayer.js
|
||||
import { useEffect, useState } from "react";
|
||||
import L from "leaflet";
|
||||
import { addContextMenuToMarker } from "../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../utils/markerUtils";
|
||||
import { addContextMenuToMarker } from "../../utils/contextMenuUtils";
|
||||
import { createAndSetMarkers } from "../../utils/markerUtils";
|
||||
|
||||
const useWdmMarkersLayer = (map, oms, GisSystemStatic, priorityConfig) => {
|
||||
const [wdmMarkers, setWdmMarkers] = useState([]);
|
||||
Reference in New Issue
Block a user