Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add legend to pane 2 maps #8

Closed
cmkimber opened this issue Aug 2, 2024 · 3 comments
Closed

add legend to pane 2 maps #8

cmkimber opened this issue Aug 2, 2024 · 3 comments

Comments

@cmkimber
Copy link
Owner

cmkimber commented Aug 2, 2024

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.

@cmkimber
Copy link
Owner Author

cmkimber commented Aug 2, 2024

rstudio/leaflet#485 is relevant to getting the legend to work

@cmkimber
Copy link
Owner Author

cmkimber commented Aug 2, 2024

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.

@cmkimber
Copy link
Owner Author

cmkimber commented Aug 2, 2024

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.

@cmkimber cmkimber closed this as completed Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant