Select to view content in your preferred language

Timeslider - Set initial extent to end of slider

929
4
10-25-2011 11:23 PM
DanielBaternik
Deactivated User
Hi,

It would be great if there was a property to configure the time slider to set the initial time extent to the end of the slider scale. This is required when a user wishes to see the current view of information, but may wish to see historical data at some point.

Also, is there a simple way to do this with the current api?
Tags (2)
0 Kudos
4 Replies
JonettaNg
Emerging Contributor
Hi depending on whether you have one thumb or two on your time slider.  This can be obtained by the following:

Assuming timeSlider is the ID of your Time Slider.
timeSlider.thumbCount


And the last thumb can be set using:
timeSlider.thumbIndexes[timeSlider.thumbCount - 1] = timeSlider.timeStops.length - 1;


I hope this helps.
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
I could not get the above to work in the 2.5 API, but this works:

timeSlider.slider.setThumbValueAt(timeSlider.thumbCount - 1, timeSlider.timeStops.length - 1);
0 Kudos
DanielBaternik
Deactivated User
Thanks Rob,

I've had to park my work on this temporarily. Originally I tried the first suggestion but that didn't work for me either. I'll give you're option a try. I'm actually embedding the time slider component into your TOC component. If you're interested i can post the amendment.

cheers
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Daniel,

   Sure I would be interested to see what you did.
0 Kudos