Convert marker popups to tooltips on hover

This commit is contained in:
Andrew Kingston 2022-03-14 11:45:26 +00:00
parent 708ad25a5f
commit 0cb3e5d98d
1 changed files with 4 additions and 7 deletions

View File

@ -216,13 +216,10 @@
row[titleKey] row[titleKey]
) )
marker.bindPopup(markerContent).addTo(mapMarkerGroup) marker.bindTooltip(markerContent, {
direction: "top",
//https://github.com/Leaflet/Leaflet/issues/7331 offset: [0, -25]
marker.on("click", function () { }).addTo(mapMarkerGroup)
this.openPopup()
})
mapMarkers = [...mapMarkers, marker] mapMarkers = [...mapMarkers, marker]
}) })
} }