leaflet icon indicating copy to clipboard operation
leaflet copied to clipboard

`layerId` causes only last observation to be mapped

Open gacolitti opened this issue 3 years ago • 0 comments

Consider adding a warning when including layerId and data contains more than one observation. It appears that only the last observation is mapped in this case.

library(leaflet)
data(quakes)
leaflet(data = quakes[1:20, ]) %>% addTiles() %>%
  addMarkers(
    layerId = "id",
    ~ long,
    ~ lat,
    popup = ~ as.character(mag),
    label = ~ as.character(mag)
  )

gacolitti avatar Apr 02 '22 02:04 gacolitti