Adding (manually) a legend in leaflet
1 | add_custom_legend(map, colors, labels, sizes, opacity = 0.65)
|
map |
A leaflet object |
colors |
A vector of colors (to fill the circles) |
labels |
A vector of labels |
sizes |
A vector of sizes |
opacity |
The opacity of the circles |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.