Vorbereitung für den Umzug auf den TALAS-Server
This commit is contained in:
@@ -22,8 +22,8 @@ function DataSheet() {
|
|||||||
const selectedIndex = event.target.options.selectedIndex;
|
const selectedIndex = event.target.options.selectedIndex;
|
||||||
const areaName = event.target.options[selectedIndex].text;
|
const areaName = event.target.options[selectedIndex].text;
|
||||||
setSelectedArea(areaName);
|
setSelectedArea(areaName);
|
||||||
console.log("Area selected oder areaName in DataSheet.js:", areaName); // Nur zur Bestätigung in der Konsole
|
//console.log("Area selected oder areaName in DataSheet.js:", areaName); // Nur zur Bestätigung in der Konsole
|
||||||
console.log("event.target:", event.target);
|
//console.log("event.target:", event.target);
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -33,7 +33,7 @@ function DataSheet() {
|
|||||||
(system) => system.IdSystem
|
(system) => system.IdSystem
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
console.log("allowedSystems:", allowedSystems);
|
//console.log("allowedSystems:", allowedSystems);
|
||||||
|
|
||||||
// Filter unique areas that belong to allowed systems
|
// Filter unique areas that belong to allowed systems
|
||||||
const seenNames = new Set();
|
const seenNames = new Set();
|
||||||
@@ -64,7 +64,7 @@ function DataSheet() {
|
|||||||
const isUnique = !seenSystemNames.has(formattedName) && item.Allow === 1;
|
const isUnique = !seenSystemNames.has(formattedName) && item.Allow === 1;
|
||||||
if (isUnique) {
|
if (isUnique) {
|
||||||
seenSystemNames.add(formattedName); // Füge den formatierten Namen hinzu
|
seenSystemNames.add(formattedName); // Füge den formatierten Namen hinzu
|
||||||
console.log("Unique system in DataSheet:", formattedName); // Zeige den formatierten Namen in der Konsole
|
//console.log("Unique system in DataSheet:", formattedName); // Zeige den formatierten Namen in der Konsole
|
||||||
}
|
}
|
||||||
return isUnique;
|
return isUnique;
|
||||||
});
|
});
|
||||||
@@ -79,14 +79,14 @@ function DataSheet() {
|
|||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
const handleCheckboxChange = (name, event) => {
|
const handleCheckboxChange = (name, event) => {
|
||||||
const { checked } = event.target;
|
const { checked } = event.target;
|
||||||
console.log(`Checkbox ${name} checked state:`, checked); // Log the checked state of the checkbox
|
//console.log(`Checkbox ${name} checked state:`, checked); // Log the checked state of the checkbox
|
||||||
|
|
||||||
setMapLayersVisibility((prev) => {
|
setMapLayersVisibility((prev) => {
|
||||||
const newState = {
|
const newState = {
|
||||||
...prev,
|
...prev,
|
||||||
[name]: checked,
|
[name]: checked,
|
||||||
};
|
};
|
||||||
console.log(`New mapLayersVisibility state:`, newState); // Log the new state after update
|
//console.log(`New mapLayersVisibility state:`, newState); // Log the new state after update
|
||||||
return newState;
|
return newState;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -337,7 +337,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
|||||||
|
|
||||||
const zoomIn = (e) => {
|
const zoomIn = (e) => {
|
||||||
initMap.flyTo(e.latlng, 12);
|
initMap.flyTo(e.latlng, 12);
|
||||||
console.log("ZoomIn koordinaten in MapComponent", e.latlng);
|
//console.log("ZoomIn koordinaten in MapComponent", e.latlng);
|
||||||
};
|
};
|
||||||
|
|
||||||
const zoomOut = (e) => {
|
const zoomOut = (e) => {
|
||||||
@@ -1297,7 +1297,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
|||||||
// Nutzt die Map, um den internen Namen zu bekommen
|
// Nutzt die Map, um den internen Namen zu bekommen
|
||||||
const internalName = layerNames["Cisco Router"] || "CiscoRouter";
|
const internalName = layerNames["Cisco Router"] || "CiscoRouter";
|
||||||
toggleLayer(mapLayersVisibility[internalName]);
|
toggleLayer(mapLayersVisibility[internalName]);
|
||||||
console.log("internalName Cisco Router: ", internalName);
|
//console.log("internalName Cisco Router: ", internalName);
|
||||||
}, [map, ciscoRouterMarkers, mapLayersVisibility]);
|
}, [map, ciscoRouterMarkers, mapLayersVisibility]);
|
||||||
|
|
||||||
//------------------------------------------ */
|
//------------------------------------------ */
|
||||||
@@ -1409,7 +1409,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
|||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (!map || !talasiclMarkers) return;
|
if (!map || !talasiclMarkers) return;
|
||||||
console.log("talasiclMarkers", talasiclMarkers);
|
//console.log("talasiclMarkers", talasiclMarkers);
|
||||||
const toggleLayer = (isVisible) => {
|
const toggleLayer = (isVisible) => {
|
||||||
if (isVisible) {
|
if (isVisible) {
|
||||||
talasiclMarkers.forEach((marker) => marker.addTo(map)); // Ensure markers are added
|
talasiclMarkers.forEach((marker) => marker.addTo(map)); // Ensure markers are added
|
||||||
@@ -1422,7 +1422,7 @@ const MapComponent = ({ locations, onLocationUpdate }) => {
|
|||||||
const internalName =
|
const internalName =
|
||||||
layerNames["TALAS ICL"] || "TALASICL || talasiclMarkers ";
|
layerNames["TALAS ICL"] || "TALASICL || talasiclMarkers ";
|
||||||
toggleLayer(mapLayersVisibility[internalName]);
|
toggleLayer(mapLayersVisibility[internalName]);
|
||||||
console.log("internalName for TALAS ICL in MapComponent: ", internalName);
|
//console.log("internalName for TALAS ICL in MapComponent: ", internalName);
|
||||||
}, [map, talasiclMarkers, mapLayersVisibility]);
|
}, [map, talasiclMarkers, mapLayersVisibility]);
|
||||||
|
|
||||||
//------------------------------------------ */
|
//------------------------------------------ */
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
const mapVersion = "0.5.3"; // Die Version der verwendeten Karte
|
const mapVersion = "0.5.3"; // Die Version der verwendeten Karte
|
||||||
const standardSideMenu = true; // Einstellung, ob ein standardmäßiges Seitenmenü verwendet wird
|
const standardSideMenu = true; // Einstellung, ob ein standardmäßiges Seitenmenü verwendet wird
|
||||||
const fullSideMenu = false; // Einstellung, ob ein vollständiges Seitenmenü verwendet wird
|
const fullSideMenu = false; // Einstellung, ob ein vollständiges Seitenmenü verwendet wird
|
||||||
const offlineData = false; // Schalter, um anzugeben, ob Daten offline verfügbar gemacht werden sollen
|
|
||||||
const serverURL = "/api"; // Die Basis-URL des Servers, von dem Daten bezogen werden
|
const serverURL = "/api"; // Die Basis-URL des Servers, von dem Daten bezogen werden
|
||||||
|
|
||||||
// Initialisieren von Variablen, die später im Browserkontext gesetzt werden
|
// Initialisieren von Variablen, die später im Browserkontext gesetzt werden
|
||||||
@@ -14,13 +13,6 @@ let mapGisStationsStaticDistrictUrl,
|
|||||||
mapGisSystemStaticUrl,
|
mapGisSystemStaticUrl,
|
||||||
mapDataIconUrl;
|
mapDataIconUrl;
|
||||||
|
|
||||||
//Offline Daten
|
|
||||||
/* let mapStaticOfflineURL,
|
|
||||||
mapStatusOfflineURL,
|
|
||||||
mapSystemOfflineURL,
|
|
||||||
mapIconsOfflineURL,
|
|
||||||
mapMeasuresOfflineURL; */
|
|
||||||
|
|
||||||
// Prüfen, ob das Code im Browser ausgeführt wird
|
// Prüfen, ob das Code im Browser ausgeführt wird
|
||||||
if (typeof window !== "undefined") {
|
if (typeof window !== "undefined") {
|
||||||
// Diese Variablen werden nur im Browser-Kontext initialisiert
|
// Diese Variablen werden nur im Browser-Kontext initialisiert
|
||||||
@@ -36,14 +28,6 @@ if (typeof window !== "undefined") {
|
|||||||
mapGisStationsMeasurementsUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsMeasurements?idMap=${c}`;
|
mapGisStationsMeasurementsUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsMeasurements?idMap=${c}`;
|
||||||
mapGisSystemStaticUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisSystemStatic?idMap=${c}&idUser=${user}`;
|
mapGisSystemStaticUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisSystemStatic?idMap=${c}&idUser=${user}`;
|
||||||
mapDataIconUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GetIconsStatic`;
|
mapDataIconUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GetIconsStatic`;
|
||||||
|
|
||||||
/* mapGisStationsStaticDistrictUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsStaticDistrict`;
|
|
||||||
mapGisStationsStatusDistrictUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsStatusDistrict`;
|
|
||||||
mapGisStationsMeasurementsUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisStationsMeasurements`;
|
|
||||||
mapGisSystemStaticUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GisSystemStatic`;
|
|
||||||
mapDataIconUrl = `${serverURL}/talas5/ClientData/WebserviceMap.asmx/GetIconsStatic`; */
|
|
||||||
|
|
||||||
// URLs zu Offline-Daten, falls benötigt
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Export der definierten Variablen und URLs, damit sie in anderen Teilen der Anwendung verwendet werden können
|
// Export der definierten Variablen und URLs, damit sie in anderen Teilen der Anwendung verwendet werden können
|
||||||
@@ -51,7 +35,6 @@ export {
|
|||||||
mapVersion,
|
mapVersion,
|
||||||
standardSideMenu,
|
standardSideMenu,
|
||||||
fullSideMenu,
|
fullSideMenu,
|
||||||
offlineData,
|
|
||||||
serverURL,
|
serverURL,
|
||||||
windowHeight,
|
windowHeight,
|
||||||
url_string,
|
url_string,
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { createProxyMiddleware } from "http-proxy-middleware";
|
|||||||
|
|
||||||
export default createProxyMiddleware({
|
export default createProxyMiddleware({
|
||||||
target: "http://10.10.0.13", // Ziel-URL des Proxys
|
target: "http://10.10.0.13", // Ziel-URL des Proxys
|
||||||
//target: "http://192.168.10.187:3000", // Ziel-URL des Proxys
|
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
pathRewrite: {
|
pathRewrite: {
|
||||||
"^/api": "/", // Optional: Entfernt /api aus dem Pfad, wenn das Backend dies nicht erfordert
|
"^/api": "/", // Optional: Entfernt /api aus dem Pfad, wenn das Backend dies nicht erfordert
|
||||||
|
|||||||
@@ -1,7 +0,0 @@
|
|||||||
// store/zoomOutState.js
|
|
||||||
import { atom } from "recoil";
|
|
||||||
|
|
||||||
export const zoomOutState = atom({
|
|
||||||
key: "zoomOutState", // eindeutiger Key
|
|
||||||
default: 7, // Start-Zoomlevel
|
|
||||||
});
|
|
||||||
Reference in New Issue
Block a user