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