How to add a fixed position (in screen) static custom Text (html) like Legend
維護者通常 1 天內回覆
@advait-zx 已經在處理了。
開始於 2023年11月7日。
評估
- 難度
- 5/5
- 預估耗時
- 一週以上
- 新手友好度
- 25/100
- Issue 類型
- 功能
- 描述清晰度
- 需要釐清
- 活躍度
- 停滯
- 技術堆疊
- css, html, javascript, python
研究方向
首先閱讀現有的 LayerControl 實作和 issue 中提到的 map.get_root() 進入點,以及連結的先前 issue。確定如何在不需要自訂 JavaScript 或 CSS 的情況下,將 Python 提供的靜態 HTML 覆蓋層定位在地圖上方。完成的標準是該功能在產生的地圖輸出中正常運作,並支援所要求的固定位置內容。
由索引模型根據 Issue 內容生成。
描述
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.
- 主要語言
- Python
- 星號
- 7.4k
- 分支
- 2.3k
- 平均合併
- 1 天 23 小時
- 30 天內合併 PR
- 11
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
python-visualization/folium 的其他 Issue
-
Allow custom colors in folium.Icon可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
python-visualization/folium#2293 · 2 則留言 ·
維護者通常 1 天內回覆
-
Make it more obvious how to add text可能已有人在做 @mosessamofficial-sys 於 232 天前認領。 未關閉documentation
難度 2/5 1-3 小時 新手友好度 68/100
python-visualization/folium#2092 · 5 則留言 ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 25/100
python-visualization/folium#2259 ·
維護者通常 1 天內回覆
-
Map output from OSM returns blocked tiles, due to defective request or not following referer-policy未關閉
難度 3/5 1-2 天 新手友好度 55/100
python-visualization/folium#2236 · 8 則留言 · 2 個 reaction ·
維護者通常 1 天內回覆
-
難度 5/5 一週以上 新手友好度 10/100
python-visualization/folium#2219 · 2 則留言 ·
維護者通常 1 天內回覆
查看 python-visualization/folium 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
cathrynlavery/diagram-design#441 ·
維護者通常 2 天內回覆
-
[Cleanup] Include the public header in work_split.cpp可能已有人在做 @blozano-tt 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 82/100
tenstorrent/tt-metal#60850 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
backend::sglang bug language::python observability
難度 2/5 半天 新手友好度 65/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 75/100
OpenShot/openshot-qt#6202 ·
維護者通常 1 天內回覆