From 1435f20aa39638152751c83bbde867d55b9c734c Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Sun, 8 Jun 2025 23:44:53 +0200 Subject: [PATCH] Fix missing popup --- app/javascript/maps/polylines.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/javascript/maps/polylines.js b/app/javascript/maps/polylines.js index f9dabe66..67f2033d 100644 --- a/app/javascript/maps/polylines.js +++ b/app/javascript/maps/polylines.js @@ -235,7 +235,7 @@ export function addHighlightOnHover(polylineGroup, map, polylineCoordinates, use hoverPopup = L.popup() .setLatLng(e.latlng) .setContent(popupContent) - .openOn(map); + .addTo(map); } } @@ -329,7 +329,7 @@ export function addHighlightOnHover(polylineGroup, map, polylineCoordinates, use hoverPopup = L.popup() .setLatLng(e.latlng) .setContent(popupContent) - .openOn(map); + .addTo(map); // Prevent the click event from propagating to the map L.DomEvent.stopPropagation(e);