Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Animated markers missing when using pre1970 dates in TimestampedGeoJson

Đang mở
#1,205 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
42/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript, python
Lĩnh vực
data-visualization

Hướng nghiên cứu

Bắt đầu từ điểm vào folium.plugins.TimestampedGeoJson và so sánh cấu hình Leaflet.TimeDimension được tạo cho các timestamp âm với mẫu được cung cấp sau năm 1970. Tái hiện ví dụ, theo dõi cách các giá trị trước năm 1970 đi tới animation và xác minh rằng các marker động xuất hiện cho cả hai phạm vi timestamp.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug

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

Ngôn ngữ chính
Python
Star
7.4k
Fork
2.3k
Merge trung bình
17 giờ 22 phút
Pull request đã merge (30 ngày)
11

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của python-visualization/folium

Tất cả issue của python-visualization/folium

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.