Spaces:
Sleeping
Sleeping
Fix TimestampedGeoJson parameter error
Browse files- Remove invalid 'point_to_layer' parameter from TimestampedGeoJson
- Simplify parameter list to use only supported options
- Remove 'duration' and 'add_last_point' parameters that may cause issues
- Keep essential animation controls: period, auto_play, loop, max_speed
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
app.py
CHANGED
@@ -628,21 +628,12 @@ def create_wind_arrow_map(wind_data):
|
|
628 |
# Add TimestampedGeoJson to map
|
629 |
TimestampedGeoJson(
|
630 |
timestamped_data,
|
631 |
-
period="PT1S",
|
632 |
-
duration="PT30S", # 30 second animation cycle
|
633 |
auto_play=True,
|
634 |
loop=True,
|
635 |
-
max_speed=
|
636 |
loop_button=True,
|
637 |
-
time_slider_drag_update=True
|
638 |
-
add_last_point=False,
|
639 |
-
point_to_layer=lambda feature, latlng: {
|
640 |
-
"fillColor": feature['properties']['style']['fillColor'],
|
641 |
-
"color": feature['properties']['style']['color'],
|
642 |
-
"weight": feature['properties']['style']['weight'],
|
643 |
-
"fillOpacity": feature['properties']['style']['fillOpacity'],
|
644 |
-
"radius": feature['properties']['style']['radius']
|
645 |
-
}
|
646 |
).add_to(wind_particles_layer)
|
647 |
|
648 |
print(f"🌪️ Created {len(particle_features)} timestamped particle positions")
|
|
|
628 |
# Add TimestampedGeoJson to map
|
629 |
TimestampedGeoJson(
|
630 |
timestamped_data,
|
631 |
+
period="PT1S",
|
|
|
632 |
auto_play=True,
|
633 |
loop=True,
|
634 |
+
max_speed=3,
|
635 |
loop_button=True,
|
636 |
+
time_slider_drag_update=True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
637 |
).add_to(wind_particles_layer)
|
638 |
|
639 |
print(f"🌪️ Created {len(particle_features)} timestamped particle positions")
|