Select to view content in your preferred language

Question about timeSlider

2997
1
01-14-2015 11:36 AM
by Anonymous User
Not applicable

In the sample from the Esri JS Samples page here: Time slider with dynamic map service layer | ArcGIS API for JavaScript

I'm missing where the actual filter to the layer is happening when a change happens on the slider. What am I missing?

Thanks!

0 Kudos
1 Reply
FilipKrál
Frequent Contributor

The way I understand it is that you:

1) create a map

2) create a time slider widget

3) say that the time slider should control the map and vice versa 'map.setTimeSlider(timeSlider);'

That way, whenever the map requests data from the server(s), it adds the time extent parameters to the requests. Time enabled services understand these parameters and return only the data that are within the time extent.

In other words, the time is passed "behind the scene" thanks to the ArcGIS JS API libraries and you don't need to worry about it. If you need finer control, you can use the map.timeExtent property and map.setTimeExtent method.

Hope this helps.

Filip.