So I am learning leaflet
library for maps and I would like to ask how to
plot not only countries but also regions for each country all well,
Regions can be clearly seen but is there a way hot to plot their each polygons and the same time?
This is how I am working on it:
library(mapview)
library(leaflet)
library(leaflet.extras)
m <- leaflet() %>% addProviderTiles("CartoDB.Positron") %>%
# addProviderTiles("Stamen.TonerLines") %>%
addGraticule(group = "Graticule") %>%
addLayersControl(overlayGroups = c("Graticule"),options = layersControlOptions(collapsed = FALSE)) %>%
addPolygons(data = world, col = 'black', fillOpacity = 0.0001, smoothFactor = 0.0001, weight = 1) %>%
addLegend(position = 'bottomleft', colors = c("green", "#FC4E07", "dodgerblue"), labels = c("Yes", "No", "Capital city"), opacity = 0.8,title = 'Map Legend') %>%
setView(lng = 18.9, lat = 52, zoom = 04.495)
m