Animated markers missing when using pre1970 dates in TimestampedGeoJson
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 42/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- javascript, python
调研方向
从 folium.plugins.TimestampedGeoJson 入口开始,将为负时间戳生成的 Leaflet.TimeDimension 配置与提供的 1970 年之后的示例进行比较。重现该示例,跟踪 1970 年之前的值如何传递到动画中,并验证两个时间戳范围都显示动画标记。
由索引模型根据 Issue 内容生成。
描述
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
- 主要语言
- Python
- 星标
- 7.4k
- 派生
- 2.3k
- 平均合并
- 17 小时 22 分钟
- 30 天内合并 PR
- 11
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
python-visualization/folium 的其他 Issue
-
documentation
难度 2/5 1-3 小时 新手友好度 68/100
python-visualization/folium#2092 · 5 条评论 ·
-
难度 3/5 1-2 天 新手友好度 67/100
python-visualization/folium#2278 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 25/100
python-visualization/folium#2259 ·
-
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 · 5 条评论 · 1 个 reaction ·
-
难度 5/5 一周以上 新手友好度 10/100
python-visualization/folium#2219 · 2 条评论 ·
查看 python-visualization/folium 的全部 Issue
相似的 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 70/100
canonical/paas-charm#368 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 75/100
-
tech debt
难度 2/5 1-3 小时 新手友好度 75/100
-
难度 1/5 1 小时以内 新手友好度 90/100
StevenBlack/hosts#3256 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
qualcomm/qai-appbuilder#275 ·