python-visualization / python-visualization/folium

Attach html to feature group

Open
#1,079 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.