View source: R/label_standardize.R
label_html | R Documentation |
A function to convert a character vector of labels for a leaflet map into a list with HTML applied to each element
label_html(label_vec)
label_vec |
A character vector of labels corresponding to the length of the mapped dataframe |
A list with HTML applied to each element of the character vector
labs <- label_standardize(leafletwrappers::wards, "Ward name: {WARD}<p></p> Area: {Area}") map <- leaflet::leaflet(leafletwrappers::wards) leaflet::addPolygons(map, label = label_html(labs))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.