Closed cmkimber closed 1 month ago
https://github.com/rstudio/leaflet/issues/485 is relevant to getting the legend to work
Currently the legend is plotted but when the circle markers are updated, the legend is not refreshed but rather an additional legend is added with each change.
Using clearGroups
with the group for the associated circle markers, which the legend is linked to, does not clear the legend. Added a call to clearControls
to clear and rebuild the legend when the map contents change.
The maps on pane 2 use circle markers to show their relative frequency of usage as starting or ending points of trips. While the general meaning is likely interpretable without a legend (more intense red -> more usage), a legend for each map would be helpful.