How to add a fixed position (in screen) static custom Text (html) like Legend
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 25/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- css, html, javascript, python
- Domain
- data-visualization, frontend, web-dev
Research direction
Start by reading the existing LayerControl implementation and the map.get_root() entry point mentioned in the issue, along with the linked prior issues. Determine how a Python-provided static HTML overlay should be positioned above the map without requiring custom JavaScript or CSS. Done means the feature works in generated map output and supports the requested fixed-position content.
Written by the indexing model from the issue text.
Description
Is your feature request related to a problem? Please describe.
Is there a way to just insert some overlay into the map with custom html code? Like legend but with descriptions or titles and such?
Describe the solution you'd like
There are clearly the elements like Layer control, Minimaps and such that are overlaid in the map, so I feel like there should be a way to put some boxes there with some custom contents. The contents can be static (generated from python string)
I'd prefer to do it with just a python string passed to some python function, without the need to write js or css ourselves if possible.
Describe alternatives you've considered
- I've tried to make a jinja template and put the html file contents in a template, but didn't work with the html made from the map being something that needs to be inside iframe.
- I tried to edit the html myself, but the map is generated from javacript.
- I tried to add the element in the
map.get_root()but it puts that on top, and if I use css to make it a overlay (I'm not good with it), then it somehow ends up below the map and invisible.
Additional context
I went through some issues thinking it should be there but didn't find anywhere.
https://github.com/python-visualization/folium/issues/86 says there used to be a custom map template you could make but it's gone now.
https://github.com/transport-nantes/tn_web/issues/135
https://github.com/python-visualization/folium/issues/781
Implementation
I'm not good with css or js, but I can do some python dev. If there is a easy way to just copy some parts from the LayerControl or such and add it, then I can help.
- Dominant language
- Python
- Stars
- 7.4k
- Forks
- 2.3k
- Avg merge
- 17h 22m
- Merged PRs (30d)
- 11
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.
More from python-visualization/folium
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
python-visualization/folium#2092 · 5 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
python-visualization/folium#2278 · 1 comment ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
python-visualization/folium#2259 ·
-
Map output from OSM returns blocked tiles, due to defective request or not following referer-policy Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
python-visualization/folium#2236 · 5 comments · 1 reaction ·
-
Difficulty 5/5 Over a week Newbie friendliness 10/100
python-visualization/folium#2219 · 2 comments ·
All issues in python-visualization/folium
Similar issues
-
essnmx good first issue
Difficulty 1/5 Under an hour Newbie friendliness 95/100
-
[Feature] 奇物选择添加优先级 Open
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
syfoud/Simulated_Scepter#174 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
Giskard-AI/giskard-oss#2840 · 1 comment ·
-
A claim comment carrying the issue number is silently declined while the workflow reports success Openarea: repo bug perceived difficulty: 2
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
yeti-platform/yeti#1380 ·