How to use the Time slider widget

3871
10
08-09-2010 11:03 PM
StephenLead
Regular Contributor III
I'm trying to implement the sample at http://help.arcgis.com/en/webapps/flexviewer/help/widgets/timeslider_widget.htm but can't work out how to hook it up to a time-aware layer.

I've got a point featureclass which is time-aware - it's shown in the services catalog as:

Time Info:
Start Time Field: Start
End Time Field: End
Track ID Field: N/A
Time Extent: [1851/01/01 00:00:00 UTC, 2010/01/01 00:00:00 UTC]
Time Reference: N/A
Time Interval: 8 (esriTimeUnitsYears)
Export Options:
Use Time: True
Time Data Cumulative: False
Time Offset: 0

There is a sample TimeWidget.xml included with the sample Flex Viewer - but how do I actually hook it up to my point layer? There's nothing in the XML file which shows which layer it should apply to.

Is it possible to see the full code used in the sample at http://help.arcgis.com/en/webapps/flexviewer/live/index.html?config=../samples/config-timeslider.xml ?

Thanks for any advice,
Steve
Tags (2)
0 Kudos
10 Replies
BjornSvensson
Esri Regular Contributor
The TimeSlider widget applies to all time-aware basemaps or operational layers.

The main configuration file for the TimeSlider sample is at
http://help.arcgis.com/en/webapps/flexviewer/samples/config-timeslider.xml
This example contains one time-aware service listed as an operational layer.

For the actual TimeSlider widget config (start/end/interval etc), see
http://help.arcgis.com/en/webapps/flexviewer/live/widgets/Time/TimeWidget_QuakesSince1970.xml

Hope this helps
0 Kudos
StephenLead
Regular Contributor III
Hi Bjorn,

Thanks for the info. I can now show a time slider widget to switch the features on at the correct time - cool!

The problem is that they are not switching OFF at the correct time - my features have a Start and End time. In ArcMap, features are removed from the map when they are no longer active, but using the Flex Viewer with the Time Slider widget, they stay on the map at all times.

I experimented with the singlethumbastimeinstant option but either True or False returns the same result. Any clues?

Thanks,
Steve
0 Kudos
DasaPaddock
Esri Regular Contributor
Have you tried setting this to 2?

<thumbcount>2</thumbcount>

Is this more what you're expecting?
0 Kudos
StephenLead
Regular Contributor III
Have you tried setting this to 2?

<thumbcount>2</thumbcount>

Is this more what you're expecting?


Hi Dasa,

Unfortunately this doesn't have any effect - the points are still displayed at all times, rather than switching off when expected. (I cleared the cache and refreshed the viewer after making the change).

Thanks,
Steve
0 Kudos
IngaPlayle
New Contributor II
From the concepts/Temporal Data page on the Flex resource center:

"If you want to visualize features for an instant in time, set the thumb count to one and specify that createTimeInstant equals true"

Is that what you are after?
0 Kudos
TomLynch1
New Contributor II
I was curious if anyone ever resolved this issue?  I've done some experimenting with it and can replicate the exact same problem.  The examples on ESRI's site do not show this specific situation. 

When TimeSlider ThumbCount is set to 2 (filtering on date range) we want to be able to utilize a FeatureLayer that is time aware and has a "Start Time Field" AND an "End Time Field".  When this is the setup we get a strange result that shows all features in this layer up to the end time range of the slider.  It's like the begin time range of the slider is not being utilized.  This is the only situation that shows a strange result, which makes me suspect there may be a bug. 

In the ESRI examples the time aware layer that is used only has a "Start Time Field" set.  We decided to test incorporating the same time aware layer in different ways and everything worked as expected in the two tests below with ThumbCount set to 2.

* Time Aware Feature Layer with ONLY "Start Time Field". (Same as ESRI example)
* Time Aware ArcGISDynamicMapServiceLayer with BOTH "Start Time Field" and "End Time Field"

We would really like to incorporate this layer as a FeatureLayer and not a ArcGISDynamicMapServiceLayer.  If anyone has any additional information it would be helpful.

Thanks,
Tom Lynch
0 Kudos
DasaPaddock
Esri Regular Contributor
This is a bug in the FeatureLayer. It will be fixed in the next release.
0 Kudos
sofialoulad
New Contributor
Hi All,
plz can i use the time slider widget with polygon features
any help plz
0 Kudos
xiaowenyang
New Contributor
Hi Sofie,
Do you figure out? I am also trying to use time widget with polygon file and got no luck so far. Wonder if the time aware functions in FLEX API supports this since all samples are using point data.

Best,

Xiaowen
0 Kudos