diff --git a/components/CircleIcon.js b/components/CircleIcon.js index fe705a55d..c9f4843d3 100644 --- a/components/CircleIcon.js +++ b/components/CircleIcon.js @@ -5,7 +5,7 @@ import "leaflet/dist/leaflet.css"; const circleIcon = L.divIcon({ className: "custom-div-icon", - html: "
", + html: "
", iconSize: [25, 25], iconAnchor: [5, 5], }); diff --git a/components/EndIcon.js b/components/EndIcon.js index 0715189db..25d272e95 100644 --- a/components/EndIcon.js +++ b/components/EndIcon.js @@ -2,7 +2,7 @@ import L from "leaflet"; const endIcon = L.divIcon({ className: "custom-end-icon", - html: "
", // Graues Viereck + html: "
", // Graues Viereck iconSize: [14, 14], iconAnchor: [7, 7], // Mittelpunkt des Vierecks als Anker }); diff --git a/components/MapComponent.js b/components/MapComponent.js index f4e7ba677..6dee11000 100644 --- a/components/MapComponent.js +++ b/components/MapComponent.js @@ -1944,10 +1944,9 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { updatedPolyline.on("mouseover", () => { updatedPolyline.setStyle({ weight: 10 }); updatedPolyline.bringToFront(); - console.log("Mouse over"); }); updatedPolyline.on("mouseout", () => { - updatedPolyline.setStyle({ weight: 5 }); + updatedPolyline.setStyle({ weight: 3 }); console.log("Mouse out"); }); @@ -2045,10 +2044,14 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { polyline.on("mouseover", (e) => { // Optional: Visualisiere, dass die Linie interaktiv ist - polyline.setStyle({ color: "blue", weight: 10 }); + //polyline.setStyle({ color: "blue", weight: 10 }); + polyline.setStyle({ weight: 10 }); }); polyline.on("mouseout", (e) => { + //polyline.setStyle({ color: "blue", weight: 3 }); + polyline.setStyle({ weight: 3 }); + // Setze die ursprüngliche Farbe zurück polyline.setStyle({ color: lineColors[lineData.idModul] || "#000000" }); });