View source: R/addpoly_legend.R
layercontrolsquick | R Documentation |
Quick function to add a vector of groups as overlay groups for a leaflet map, and hide groups you don't want displayed in one step
layercontrolsquick(leafletobj, groups, hide = NULL, .pos = "topleft")
leafletobj |
Leaflet object |
groups |
Character vector of overlay groups to show on Leaflet map |
hide |
Groups to hide on leaflet map. If NULL (default), hides all groups but first group |
.pos |
Position of layer controls; default "topleft" |
Leaflet map with overlay groups
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.