edit: Gerät dropdown menü in modal POi hinzufügen
This commit is contained in:
@@ -1231,6 +1231,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
const { latitude, longitude } = parsePoint(location.position);
|
||||
const poiTypName = poiTypMap.get(location.idPoiTyp) || "Unbekannt";
|
||||
const deviceName = await fetchDeviceNameById(location.idLD);
|
||||
console.log("deviceName:", deviceName); // Das ist in Modal POI hinzufügen
|
||||
|
||||
const canDrag = userRights ? userRights.includes(56) : false;
|
||||
const matchingIcon = poiData.find(
|
||||
@@ -2233,12 +2234,17 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
return marker;
|
||||
});
|
||||
|
||||
// Erstellen der Polyline
|
||||
// Erstellen der Polyline und Einrichten eines Tooltips
|
||||
const polyline = L.polyline(lineData.coordinates, {
|
||||
color: lineColors[lineData.idModul] || "#000000",
|
||||
}).addTo(map);
|
||||
|
||||
// Einrichten der mouseover- und mouseout-Event-Handler
|
||||
// Hinzufügen eines Tooltips
|
||||
polyline.bindTooltip("Informationen oder Name der Linie", {
|
||||
permanent: false, // true, wenn Sie möchten, dass der Tooltip immer sichtbar ist
|
||||
direction: "auto", // Kann 'right', 'left', 'top' oder 'bottom' sein
|
||||
});
|
||||
|
||||
polyline.on("mouseover", () => {
|
||||
polyline.setStyle({ weight: 8 });
|
||||
polyline.bringToFront();
|
||||
@@ -2254,6 +2260,7 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => {
|
||||
setMarkers(newMarkers);
|
||||
setPolylines(newPolylines);
|
||||
}, [map, linePositions, lineColors]);
|
||||
|
||||
//---------------------------------------------------------
|
||||
//---------------------------------------------------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user