socib / Leaflet.TimeDimension

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

Updating available times always loads the last one #166

Closed gmoustri closed 1 year ago

gmoustri commented 5 years ago

Hi, when you create a default time dimension object e.g.

timeDim=L.timeDimension();   
map.timeDimension = timeDim;

and the setting the available times (i get them through Ajax),

timeDim.setAvailableTimes(rawDateStrings,'replace');

it always loads the last time. How can I stop this? Using,

timeDim.setCurrentTimeIndex(0);

loads the last and then the first. No quite my tempo. Thanks