How to add a fixed position (in screen) static custom Text (html) like Legend
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 5/5
- Geschätzter Aufwand
- Über eine Woche
- Anfängerfreundlichkeit
- 25/100
- Issue-Typ
- Feature
- Klarheit
- Muss geklärt werden
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- css, html, javascript, python
- Bereich
- data-visualization, frontend, web-dev
Rechercherichtung
Beginne damit, die bestehende LayerControl-Implementierung und den im Issue erwähnten Einstiegspunkt map.get_root() sowie die verknüpften früheren Issues zu lesen. Ermittle, wie ein von Python bereitgestelltes statisches HTML-Overlay über der Karte positioniert werden sollte, ohne benutzerdefiniertes JavaScript oder CSS zu erfordern. Erledigt ist die Aufgabe, wenn das Feature in der generierten Kartenausgabe funktioniert und den angeforderten Inhalt mit fester Position unterstützt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Python
- Sterne
- 7.4k
- Forks
- 2.3k
- Ø Merge
- 17 Std. 22 Min.
- Gemergte PRs (30 T.)
- 11
Beitragsleitfaden
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus python-visualization/folium
-
documentation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
python-visualization/folium#2092 · 5 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 67/100
python-visualization/folium#2278 · 1 Kommentar ·
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 25/100
python-visualization/folium#2259 ·
-
Map output from OSM returns blocked tiles, due to defective request or not following referer-policy Offen
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
python-visualization/folium#2236 · 5 Kommentare · 1 Reaktion ·
-
Touch Screen often fails Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 10/100
python-visualization/folium#2219 · 2 Kommentare ·
Alle Issues in python-visualization/folium
Ähnliche Issues
-
area: harness bug status: needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Human-Agent-Society/reef#625 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 80/100
learningequality/kolibri#15351 · 2 Kommentare ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
-
Name consistency Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
eellak/triplestore#65 · 1 Kommentar ·