make_map(maps = "Topo") |>
leaflet::addMarkers(
lng = ~lng,
lat = ~lat,
label = ~name,
popup = ~name,
group = "marker",
data = us_cities
) |>
add_search_button(
group = "marker",
zoom = 15,
text_placeholder = "Search city names..."
)
Run the code above in your browser using DataLab