diff --git a/.env.local b/.env.local index 582ebfb9b..426f51759 100644 --- a/.env.local +++ b/.env.local @@ -31,7 +31,7 @@ NEXT_PUBLIC_BASE_URL="http://10.10.0.30/talas5/devices/" NEXT_PUBLIC_SERVER_URL="http://10.10.0.70" NEXT_PUBLIC_PROXY_TARGET="http://10.10.0.70" NEXT_PUBLIC_ONLINE_TILE_LAYER="http://10.10.0.13:3000/mapTiles/{z}/{x}/{y}.png" -NEXT_PUBLIC_ONLINE_TILE_LAYER="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" +#NEXT_PUBLIC_ONLINE_TILE_LAYER="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" ######################### #DB_HOST=192.168.10.167 diff --git a/utils/mapFeatures.js b/utils/mapFeatures.js index 8cba33e7f..09b98b36f 100644 --- a/utils/mapFeatures.js +++ b/utils/mapFeatures.js @@ -237,6 +237,16 @@ export const setupPolylines = (map, linePositions, lineColors, tooltipContents, color: lineColors[`${lineData.idLD}-${lineData.idModul}`] || "#000000", contextmenu: true, contextmenuItems: [ + { + text: "Station öffnen (Tab)", + icon: "/img/screen_new.png", + callback: (e) => { + console.log("lineData idLD:", lineData.idLD); + const idLD = lineData.idLD; // Angenommen, die ID der Station ist in lineData vorhanden + const link = `${process.env.NEXT_PUBLIC_BASE_URL}cpl.aspx?id=${idLD}`; + window.open(link, "_blank"); // Öffne direkt den Link in einem neuen Tab + }, + }, { text: "Stützpunkt hinzufügen", icon: "/img/icons/gisLines/add-support-point.svg",