socib / Leaflet.TimeDimension

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

Basic question: How to specify the time in the layer source #190

Open sgofferj opened 4 years ago

sgofferj commented 4 years ago

I have been trying to get the TimeDimension plugin to work on a personal project on and off for about a year. I went through the examples several times but I'm apparently missing the part on how to get the time dimension into TimeDimension from the server side or - more specifically - how to output the source data for the layer with a time dimension. I guess, the examples are a little bit above my skill level yet (JS beginner here).

In my specific case, I have layers which consist of one PNG file which is named filename-100.png to filename-160.png, representing different points in time. I switch between the layers rather crudely with some self-designed buttons but that doesn't really scale, hence my looking into the TimeDimension plugin. How would I go about to make this data usable with the plugin? Renaming the files would be no problem, neither would be sorting them into directories. I also looked into gdal2tiles.