R/controls.R
add_legend.Rd
Add a Custom Map Legend
add_legend(map, title, colors, labels = NULL, domain = NULL, layer_id = NULL)
A glmap widget or glmap_proxy.
glmap
glmap_proxy
Legend title.
Character vector of hex/CSS colors.
Character vector of category labels (for categorical legends).
Numeric vector c(min, max) (for continuous legends).
c(min, max)
Optional associated layer ID.