Convert marker popups to tooltips on hover

This commit is contained in:
Andrew Kingston 2022-03-14 11:45:26 +00:00
parent 2841fb2b57
commit 4d01063383
1 changed files with 4 additions and 7 deletions

View File

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