Force time slider to daily increment

2222
2
Jump to solution
03-03-2016 02:31 PM
RichardButgereit
Occasional Contributor

We have a time enabled map service showing the track of a hurricane for our upcoming statewide hurricane exercise. -- Events/2015_06_HurrEx_KIMO (MapServer) . For purposed of the exercise, for each day there is only 1 forecast.

It works just fine with a web app like this -- ArcGIS Web Application

Except -- note how the Time Slider has two handles on it to set the duration of the time displayed -- from May 15, 2016, 8:00 PM to May 16, 2016, 8:00 PM. That isn't a problem on Day 1 of the exercise.

But on Day 2 -- it is, because now the map is displaying 2 current locations and 2 forecast tracks.

The solution is, of course -- to close up the 2 sliders, to display only 1 day like this --

There -- that's perfect for Day 2 of the exercise.

Challenge is -- my users can't be expected to learn that trick.

I need to either set the time handles to the same interval -- or better yet, even just get rid of one, so that only 1 day at a time will be displayed.

Anybody have any ideas?

Seems like it would be a mighty useful setting to only show daily increments, and not durations overlapping days.

And, yes -- I have played with all time enabled settings in the map -- the setting there is 1 day -- but those handles allow the user to set durations overlapping a day.

0 Kudos
1 Solution

Accepted Solutions
RichardButgereit
Occasional Contributor

Okay -- we got this.

widgets\TimeSlider\Widget.js- line 78

  • change -- this.timeSlider.setThumbIndexes([0,1]);
  • to -- this.timeSlider.setThumbIndexes([0,0]);

Now "start" and "end" time slider handles are on same tick mark.

Yes, the user can click and separate them again - but I am comfortable with the starting point is 1 day, as long as they stick with 'Play' and 'Next' they will be okay, and if they do click and separate the handles they will figure out how to slide back onto each other to get the 1 day view.

Wish there was a better answer to constraining time enabled data to a 1 day view.

View solution in original post

2 Replies
RichardButgereit
Occasional Contributor

Okay -- we got this.

widgets\TimeSlider\Widget.js- line 78

  • change -- this.timeSlider.setThumbIndexes([0,1]);
  • to -- this.timeSlider.setThumbIndexes([0,0]);

Now "start" and "end" time slider handles are on same tick mark.

Yes, the user can click and separate them again - but I am comfortable with the starting point is 1 day, as long as they stick with 'Play' and 'Next' they will be okay, and if they do click and separate the handles they will figure out how to slide back onto each other to get the 1 day view.

Wish there was a better answer to constraining time enabled data to a 1 day view.

View solution in original post

ByronMoldofsky
New Contributor II

I realize this is an old discussion, but the solution did not work for me with v. 2.5. However, see:
https://community.esri.com/thread/199802-time-slider-widget-customization-single-handle