diff --git a/config/appVersion.js b/config/appVersion.js
index 236fc6adf..b7fdc2696 100644
--- a/config/appVersion.js
+++ b/config/appVersion.js
@@ -1,2 +1,2 @@
// /config/appVersion
-export const APP_VERSION = "1.1.208";
+export const APP_VERSION = "1.1.209";
diff --git a/utils/devices/createAndSetDevices.js b/utils/devices/createAndSetDevices.js
index 6aa6a7e7f..0bcbc757d 100644
--- a/utils/devices/createAndSetDevices.js
+++ b/utils/devices/createAndSetDevices.js
@@ -2,11 +2,10 @@
import L from "leaflet";
import "leaflet.smooth_marker_bouncing";
import { store } from "../../redux/store.js";
-import { updateLineStatus } from "../../redux/slices/lineVisibilitySlice.js";
import { setSelectedDevice } from "../../redux/slices/selectedDeviceSlice.js";
import { selectGisStationsStaticDistrict } from "../../redux/slices/webservice/gisStationsStaticDistrictSlice.js";
import { selectGisStationsStatusDistrict } from "../../redux/slices/webservice/gisStationsStatusDistrictSlice.js";
-import { selectGisStationsMeasurements } from "../../redux/slices/webservice/gisStationsMeasurementsSlice.js"; // ✅
+import { selectGisStationsMeasurements } from "../../redux/slices/webservice/gisStationsMeasurementsSlice.js";
const determinePriority = (iconPath, priorityConfig) => {
for (let priority of priorityConfig) {
@@ -18,7 +17,6 @@ const determinePriority = (iconPath, priorityConfig) => {
};
export const createAndSetDevices = async (systemId, setMarkersFunction, GisSystemStatic, priorityConfig, measurements) => {
- const mode = process.env.NEXT_PUBLIC_API_PORT_MODE;
const basePath = process.env.NEXT_PUBLIC_BASE_PATH || "";
try {
@@ -61,6 +59,7 @@ export const createAndSetDevices = async (systemId, setMarkersFunction, GisSyste
idDevice: station.IdLD,
});
+ // ✅ Popups nur für Statusdaten
let popupContent = `
${station.LD_Name}
@@ -79,60 +78,52 @@ export const createAndSetDevices = async (systemId, setMarkersFunction, GisSyste
`
)
.join("")}
- `;
-
- if (station.System === 11 && messung) {
- popupContent += `
-
- 🌡️ Temperatur: ${messung.Temp} °C
- 💧 Feuchte: ${messung.Humidity} %
- ⚡ Spannung: ${messung.U} V
-
`;
- }
-
- popupContent += ``;
+
+ `;
marker.bindPopup(popupContent);
- // ✅ Permanenter Tooltip über dem Marker
+ // ✅ Tooltip im GMA-Stil mit Messwerten
if (station.System === 11 && messung) {
- const tooltipText = `🌡 ${messung.Temp ?? "-"}°C | 💧 ${messung.Humidity ?? "-"}% | ⚡ ${messung.U ?? "-"}V`;
- marker.bindTooltip(tooltipText, {
+ const lt = messung["LT"] ?? "-";
+ const fbt = messung["FBT"] ?? "-";
+ const gt = messung["GT"] ?? "-";
+ const rlf = messung["RLF"] ?? "-";
+
+ const gmaTooltipHtml = `
+
+
${station.Area_Name}
+
LT: ${lt} °C
+
FBT: ${fbt} °C
+
GT: ${gt} °C
+
RLF: ${rlf} %
+
+ `;
+
+ marker.bindTooltip(gmaTooltipHtml, {
permanent: true,
- direction: "top",
- offset: [0, -40],
- className: "gma-tooltip",
+ direction: "right",
+ offset: [50, -20],
+ interactive: true,
+ className: "leaflet-tooltip gma-tooltip",
});
}
marker.on("mouseover", () => {
- store.dispatch(setSelectedDevice({ id: station.IdLD, name: station.Device, area: station.Area_Name }));
+ store.dispatch(
+ setSelectedDevice({
+ id: station.IdLD,
+ name: station.Device,
+ area: station.Area_Name,
+ })
+ );
marker.openPopup();
});
marker.on("contextmenu", (event) => {
event.originalEvent?.preventDefault();
marker.openPopup();
- marker.bindContextMenu({
- contextmenu: true,
- contextmenuWidth: 160,
- contextmenuItems: [
- { separator: true },
- {
- text: "Station öffnen (Tab)",
- icon: "/img/screen_new.png",
- callback: () => {
- const link = `${window.location.origin}${basePath}/cpl.aspx?ver=35&kue=24&id=${station.IdLD}`;
- window.open(link, "_blank");
- },
- },
- ],
- });
});
- if (typeof marker.bounce === "function" && statis) {
- marker.on("add", () => marker.bounce(3));
- }
-
return marker;
});