I am running into an issue with the time sliders in Leaflet. It appears that most all of the sliders developed for Leaflet operate on the assumption that each record in your data layer has a specific time/date. Unfortunately, my data (historical by nature) have date ranges instead of a specific date (i.e. 1787 - 1810 as opposed to 8 August 1787). I was envisioning a time slider that could add the point to the map when the slider crosses into the items date range and then removes the point when the slider leaves the date range. Does my question make sense and if it does, how can I best address this issue?

  • It would take some sort of program or logic to decipher a ranged value since it's basically two pieces of information in a single field. Seems like the easiest solution would be create two new fields in your data, start_date and end_date, then split the current field to those. Most timesliders can handle that format. – Chris W May 5 '15 at 19:06
  • Thanks for the response @Chris W . I should have been more specific in my post but I do have the date range separated into two different fields. I have been working with LeafletSlider without much progress. I have just been struggling finding any documentation or examples of this particular usage of the time slider. Do you know of any or maybe a better time slider option? – GeogCoder May 6 '15 at 1:06
  • Sorry, not familiar with leaflet. You should edit your question with the button at the lower left to include this information, rather than just leaving it in a comment so people don't have to hunt through a potentially long chain of comments to find the relevant info. I did a quick google and wound up at the link in your comment before I even saw it. I see there's a range property there, but the documentation seems to be a little thin on how it works/what it does (seems like it enables start/end controls on the slider separately? github.com/BobTorgerson/Leaflet-WMS-Time-Slider). – Chris W May 6 '15 at 1:51
  • Hi @GeogCoder I put together a bit of a tutorial on create a time slider map with leaflet so this might be helpful. Good luck! rowanwinsemius.id.au/blog/… – rowanwins May 28 '15 at 12:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.