Skip to content

feat(TimestampedGeoJson): support marker-only animation without redrawing paths - #2323

Open
senanurcetin wants to merge 3 commits into
python-visualization:mainfrom
senanurcetin:fix/1945-timestamped-markers-without-paths
Open

senanurcetin wants to merge 3 commits into
python-visualization:mainfrom
senanurcetin:fix/1945-timestamped-markers-without-paths

Conversation

@senanurcetin

@senanurcetin senanurcetin commented Oct 27, 2026 •

Copy link
Copy Markdown

Summary

Addresses #1945.

Add the opt-in show_path=False setting to TimestampedGeoJson to animate moving last-point markers without drawing LineString paths in every animation frame. The default show_path=True preserves existing behavior.

Previously, Leaflet.TimeDimension could recreate polylines at every frame. Without explicit styling, these could appear as unwanted blue lines.

Changes

  • Add show_path: bool = True, preserving the existing default.
  • In marker-only mode, exclude LineString paths from time-dimension frame-layer rendering while retaining the original source features for timestamps and marker positions.
  • Keep animated last-point markers available with add_last_point=True.
  • Add regression tests for the marker-only option and the default behavior.

Changed files:

  • folium/plugins/timestamped_geo_json.py
  • tests/plugins/test_timestamped_geo_json.py

Verification reported for the contributor branch

  • Relevant Folium plugin and map tests: 23 passed locally on Windows.
  • Ruff lint and git diff --check: passed locally.
  • Leaflet.TimeDimension 1.1.1 update logic was exercised against the issue's dataset.
Observed behavior Default show_path=False
Animated LineString paths 175 0
Moving markers 115 115
Original source tracks retained 175 175

These are previously reported functional checks, not an independent current-head CI result or an FPS/CPU benchmark. Skipping per-frame polyline construction does not itself establish measured rendering-performance gains.

Scope and limitations

This PR changes only the Folium plugin and its tests. It does not change how source track features are indexed. Browser frame rate, CPU usage and full upstream CI have not been verified in this description.

AI assistance

AI assistance was used for investigation, implementation and regression-test development. Maintainer review remains welcome.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant