The Leaflet JS mapping library has lots of plugins available. The Leaflet package for R provides direct support for some, but far from all, of these plugins, by providing R functions for invoking the plugins.
If you as an R user find yourself wanting to use a Leaflet plugin that isn't directly supported in the R package, you can use the technique shown here to load the plugin yourself and invoke it using JS code.
@helgasoft
@jcheng5
Great work! do you know how you would do something like this with a map that is already constructed with mapview?
I would like to make the resulting map's legend say:
Places
|-> names
|-> village
Other
|-> Changed Name
install.packages("mapview")
install.packages("dplyr")
install.packages("magrittr")
library(mapview)
library(dplyr)
library(magrittr)
names = breweries %>%
select(brewery)
village = breweries %>%
select(village)
Complicated Name_layer = breweries %>%
select(number.of.types)
mapview(names, legend = F) +
mapview(village, legend = F) +
mapview(Complicated Name_layer, legend = F)
Thank you so much!!