python-visualization / python-visualization/folium
Attach html to feature group
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.4k
- Forks
- 2.3k
- Avg merge
- 17h 22m
- Merged PRs (30d)
- 11
Description
I am looking to add an HTML legend at the bottom corner of each layer. The legend will be different per layer.
I can add an HTML legend to the base map using map.get_root().html.add_child(<html>), however this will only display the same text for all layer. I am looking instead for a method to attach html to a feature group, ie, something like feature_group.get_root().html.add_child(<html>).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing map.get_root().html.add_child(<html>) entry point and the proposed feature_group.get_root().html.add_child(<html>) approach. Trace how map and feature-group roots are represented, then define done as allowing distinct HTML legends to render for each layer; no files or tests are named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html, javascript, python
- Domain
- data-visualization, frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100