icon.fa <- makeAwesomeIcon(icon = "flag", markerColor = "red", library = "fa",
iconColor = "black")
map <- leaflet(data2) %>%
addBootstrapDependency() %>%
setView(32, 1.6, zoom = 7) %>%
addProviderTiles(providers$Esri.WorldGrayCanvas) %>%
addCircleMarkers(
radius = 2,
color = "black",
stroke = TRUE,
fillOpacity = .2
) %>%
addLegend("bottomright",
colors = "black",
labels ="Clinic",
title = "Health Centers",
opacity = .9) %>%
addAwesomeMarkers(
~longitude,
~latitude,
clusterOptions = markerClusterOptions(),
label = ~as.character(cleanname),
icon = icon.fa)
## Assuming "longitude" and "latitude" are longitude and latitude, respectively
map