python-visualization / python-visualization/folium
HeatmapWithTime is visualized in the back of overlay image
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 7.4k
- 派生
- 2.3k
- 平均合并
- 17 小时 22 分钟
- 30 天内合并 PR
- 11
描述
HeatMapWithTime is visualized in the back of the overlay image, even after including <style>.leaflet-heatmap-layer{z-index:300 !important}</style> in my html.
According to https://github.com/python-visualization/folium/issues/1201, including this <style>.leaflet-heatmap-layer{z-index:300 !important}</style> in my html should bring the Heatmap to the front. However, that did not work.
My map looks like this:
Basemap
m = folium.Map([35, 41], tiles='stamentoner', zoom_start=6)
Land Use Changes
folium.raster_layers.ImageOverlay(
image=dataimage,
bounds=[[ymin, xmin], [ymax, xmax]],
colormap = lambda x: (x, x, x),
name= 'MODIS Transitions 2009 vs. 2017',
opacity=.8,
zindex=1,
overlay=False,
mercator_project=True).add_to(m)
UCDP HeatMap
hm = HeatMapWithTime(data=list(data.values()), # coordinates
index=list(data.keys()), # years
name = 'UCDP events',
radius=10,
auto_play=False,
max_opacity=1).add_to(m)
folium.LayerControl().add_to(m)
m.save('html/index.html')
My html header is attached:
index.txt
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先检查附带的 index.txt,并使用 issue 中的 HeatMapWithTime 和 ImageOverlay 示例复现地图。跟踪这些图层在已保存的 html 中的渲染和排序方式,然后验证 heatmap 显示在 overlay 前面,同时 LayerControl 和现有地图设置仍能正常工作。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- css, javascript, python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 25/100