From 3a965dbfa8637d55f165ae8460672d4b773c706d Mon Sep 17 00:00:00 2001 From: ISA Date: Fri, 7 Jun 2024 14:26:47 +0200 Subject: [PATCH] edit: blaue Punkte statt icons am Beginn und Ende des Linie --- components/MapComponent.js | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/components/MapComponent.js b/components/MapComponent.js index ce2cad1e2..d0dded82c 100644 --- a/components/MapComponent.js +++ b/components/MapComponent.js @@ -2082,23 +2082,25 @@ const MapComponent = ({ locations, onLocationUpdate, lineCoordinates }) => { // Create a polyline for each set of coordinates const polyline = L.polyline(line, { color: "red" }).addTo(map); - // Add start marker - const startIcon = new L.Icon({ - iconUrl: "/path/to/start-icon.png", - iconSize: [25, 41], - iconAnchor: [12, 41], - popupAnchor: [1, -34], - }); - L.marker(line[0], { icon: startIcon }).addTo(map); + // Add start circle marker + L.circleMarker(line[0], { + radius: 5, + fillColor: "#0000FF", + color: "#0000FF", + weight: 1, + opacity: 1, + fillOpacity: 0.8, + }).addTo(map); - // Add end marker - const endIcon = new L.Icon({ - iconUrl: "/path/to/end-icon.png", - iconSize: [25, 41], - iconAnchor: [12, 41], - popupAnchor: [1, -34], - }); - L.marker(line[line.length - 1], { icon: endIcon }).addTo(map); + // Add end circle marker + L.circleMarker(line[line.length - 1], { + radius: 5, + fillColor: "#0000FF", + color: "#0000FF", + weight: 1, + opacity: 1, + fillOpacity: 0.8, + }).addTo(map); } }); }, [map, linePositions]);