python-visualization / python-visualization/folium
Animated markers missing when using pre1970 dates in TimestampedGeoJson
まだ誰も着手していません。
- 主要言語
- Python
- スター
- 7.4k
- フォーク
- 2.3k
- 平均マージ
- 17時間 22分
- マージ済み PR(30日)
- 11
説明
Animated markers missing when using pre1970 dates in TimestampedGeoJson. I understand this functionality from Leaflet.TimeDimension, but had thought this issue was fixed there (Merged pull request: https://github.com/socib/Leaflet.TimeDimension/pull/91).
Please add a code sample or a nbviewer link, copy-pastable if possible
import folium
from folium.plugins import TimestampedGeoJson
# Post-1970 timestamps: 1970-01-02, 1970-01-03, 1970-01-04
milliseconds_per_day = 1000 * 60 * 60 * 24
post_1970_timestamps=[1*milliseconds_per_day, 2*milliseconds_per_day, 3*milliseconds_per_day]
# Pre-1970 timestamps: 1969-12-29, 1969-12-30, 1969-12-31
pre_1970_timestamps=[0-time for time in post_1970_timestamps]
# Ensure pre_1970_timestamps are in ascending order:
pre_1970_timestamps.reverse()
m = folium.Map(location=[0,0],zoom_start=2)
ts=TimestampedGeoJson({
'type': 'FeatureCollection',
'features': [
{
'type': 'Feature',
'geometry': {
'type': 'LineString',
'coordinates': [[-70,-25],[-70,35],[70,35]],
},
'properties': {
# Dates shown in time slider controls, but no markers displayed on map
# Contrast behaviour when times read from post_1970_timestamps list:
# - animated markers shown on map as per example
'times': pre_1970_timestamps
#'times': post_1970_timestamps
}
}
]
})
ts.add_to(m)
m
Problem description
No markers shown on maps using TimestampedGeoJson with dates pre 1970 (as held in pre_1970_timestamps list)
Expected Output
Animated markers as per the TimestampedGeoJson with post_1970_timestamps
Output of folium.__version__
0.10.0
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
folium.plugins.TimestampedGeoJson のエントリーポイントから開始し、負のタイムスタンプに対して生成される Leaflet.TimeDimension 設定を、提示された 1970 年以降のサンプルと比較してください。例を再現し、1970 年より前の値がどのようにアニメーションに到達するかを追跡し、両方のタイムスタンプ範囲でアニメーションするマーカーが表示されることを確認してください。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, python
- 領域
- data-visualization
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 42/100