Skip to content

Instantly share code, notes, and snippets.

@BobTheScientist
BobTheScientist / circleSizeLegend.r
Created May 3, 2016 20:51
R Function to create a circle size legend in Leaflet
# Function to create a circle size legend in Leaflet
# This takes as input a variable to determine the size range,
# a number of sizes to show, and a label and writes the HTML
# to create the legend.
#
# It requires some custom CSS that must be included somewhere:
#
# .legendCircle {
# border-radius:50%;