Linien Daten aktualisieren

This commit is contained in:
ISA
2024-09-18 11:06:26 +02:00
parent fbb3dac38b
commit 41454f7efe
4 changed files with 15 additions and 7 deletions

View File

@@ -1,17 +1,17 @@
#.env.local
#je nach dem Mysql Server, ob localhost freigegeben ist oder die IP Adresse des Servers, manchmal die beide und manchmal nur eine
#DB_HOST=10.10.0.13
#DB_HOST=10.10.0.30
#DB_USER=root
#DB_PASSWORD="root#$"
#DB_NAME=talas_v5
#DB_PORT=3306
#########################
#NEXT_PUBLIC_BASE_URL="http://10.10.0.13/talas5/devices/"
#NEXT_PUBLIC_SERVER_URL="http://10.10.0.13"
#NEXT_PUBLIC_PROXY_TARGET="http://10.10.0.13"
#NEXT_PUBLIC_ONLINE_TILE_LAYER="http://10.10.0.13:3000/mapTiles/{z}/{x}/{y}.png"
#NEXT_PUBLIC_BASE_URL="http://10.10.0.30/talas5/devices/"
#NEXT_PUBLIC_SERVER_URL="http://10.10.0.30"
#NEXT_PUBLIC_PROXY_TARGET="http://10.10.0.30"
#NEXT_PUBLIC_ONLINE_TILE_LAYER="http://10.10.0.30:3000/mapTiles/{z}/{x}/{y}.png"
#########################

BIN
NodeMap.pdf Normal file

Binary file not shown.

View File

@@ -103,7 +103,15 @@ const useLineData = (webserviceGisLinesStatusUrl, setLineStatusData) => {
}
};
const scheduleNextFetch = () => {
if (!isCancelled) {
fetchData();
setTimeout(scheduleNextFetch, 30000);
}
};
fetchData();
scheduleNextFetch();
return () => {
isCancelled = true;

View File

@@ -323,8 +323,8 @@ export const setupPolylines = (map, linePositions, lineColors, tooltipContents,
const contextMenu = this._map.contextmenu; // Zugriff auf das Kontextmenü
const closeMenu = () => contextMenu.hide(); // Funktion zum Schließen des Menüs
const countdown = parseInt(localStorage.getItem("contextMenuCountdown"), 10);
if (countdown >= 17) {
const countdown = parseInt(localStorage.getItem("contextMenuCountdown"), 30);
if (countdown >= 28) {
closeMenu();
}
});