socib / Leaflet.TimeDimension

Add time dimension capabilities on a Leaflet map.
MIT License
433 stars 138 forks source link

Using the limitSliders to only show specific time interval of whole GeoJSON #219

Open BodoMinea opened 2 years ago

BodoMinea commented 2 years ago

Hello and first of all thanks for this great plugin, I have been using it for a few years without issues. However, I came across an use case that requires a modification that I can't really wrap my head around to implementing.

Basically, I need to limit, by user input, how "early" information should start showing up on the viewer page from a GeoJSON file that already has a whole day's track info in it.

1

The closest I could get to my goal was enabling the limitSliders. However, it is my understanding that this is not how this function is supposed to be used - they only control the animated range that is played. Dragging the start limit slider makes the animation start from that state, with all the prior markers already shown and that makes sense for the original intended use.

2

Is there a way to make this feature behave as I described or could anyone kindly point me to the file / code section that governs the limit sliders and "point/track progress" selection/filtering so that I can attempt to implement the change myself?

Thank you very much in advance!

r1m commented 2 years ago

There is an event fires on timedimension when range limit changes : limitschanged. You can try to listen to this and filter your data