make_map(maps = "Topo") |>
leaflet::addMarkers(
lng = ~lng,
lat = ~lat,
label = ~name,
popup = ~name,
clusterOptions = leaflet::markerClusterOptions(
showCoverageOnHover = FALSE
),
clusterId = "cluster",
group = "marker",
data = us_cities
) |>
add_cluster_button(cluster_id = "cluster")
Run the code above in your browser using DataLab