How can a popup stay open when clicking on another?
The MWE below show a popup when I click on the markers. Good. But when I click on a second marker I don't want the first popup to disappear. It should only disapear when clicking the close [x]. No popups should be visible before clicking on the markers.
library(leaflet)
the.points <- data.frame(latitude=c(63.136353,63.132935,63.128051),
longitude=c(21.928023,21.962601,21.893444),
text=c("One point", "A second point", "The third point"))
p <- leaflet(the.points)
p <- addTiles(p)
p <- addMarkers(p, lng=~longitude, lat=~latitude, popup=~text)
p
I tried with addPopups too, but they are all visible by default. If that can be changed it would be good (not sure how).