python-visualization / python-visualization/folium

HeatmapWithTime is visualized in the back of overlay image

オープン
#1,400 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

bug
主要言語
Python
スター
7.4k
フォーク
2.3k
平均マージ
17時間 22分
マージ済み PR(30日)
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず添付された index.txt を確認し、issue の HeatMapWithTime と ImageOverlay の例を使ってマップを再現します。保存された html でそれらのレイヤーがどのように描画され、順序付けられているかを追跡し、そのうえで、LayerControl と既存のマップ設定が引き続き機能することを確認しながら、heatmap が overlay の前面に表示されることを検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
css, javascript, python
領域
data-visualization
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。