This page describes an older version, please see latest API at http://resources.arcgis.com/en/help/flex-api/apiref/com/esri/ags/components/TimeSlider.html.
Packagecom.esri.ags.components
Classpublic class TimeSlider
InheritanceTimeSlider Inheritance spark.components.supportClasses.SkinnableComponent
Implements ITimeSlider

Since : ArcGIS API for Flex 2.0

The Time Slider component for one or more maps that have time-aware layers. You can use the TimeSlider by either setting the Map.TimeSlider property (on a map) or listen to the TimeSlider.timeExtentChange event.

Default TimeSlider: Default TimeSlider

See also

Live sample - Using TimeSlider with ArcGISDynamicMapServiceLayer (server creates images)
Live sample - Using TimeSlider with FeatureLayer (graphics created on client)
Live sample - Using TimeSlider with two time-aware layers
Live sample - Using TimeSlider for time filtering
What is temporal data? [ArcGIS desktop help]
How time is supported in spatial data [ArcGIS desktop help]
Serving time-aware layers [ArcGIS desktop help]
Enabling time on your data [ArcGIS desktop help]


Public Properties
 PropertyDefined By
  excludeDataAtLeadingThumb : Boolean
When true, subtracts one second from the time extent's end time to exclude data at the exact end time instant.
TimeSlider
  excludeDataAtTrailingThumb : Boolean
When true, adds one second to the time extent's start time to exclude data at the exact start time instant.
TimeSlider
  fullTimeExtent : TimeExtent
[read-only] The full time extent from start time to end time.
TimeSlider
  loop : Boolean
Restart play from beginning after it reaches the last time stop.
TimeSlider
  playing : Boolean
[read-only] Returns true if TimeSlider is currently 'playing'.
TimeSlider
  singleThumbAsTimeInstant : Boolean
If this is true and thumbCount is 1, then the timeExtent will represent a time instant.
TimeSlider
  thumbCount : int
The number of thumbs on the slider.
TimeSlider
  thumbIndexes : Array
Current thumb location(s).
TimeSlider
  thumbMovingRate : int
How fast to move from one time stop to the next time stop.
TimeSlider
  timeExtent : TimeExtent
[read-only] Current time extent of the time slider 'thumbs'.
TimeSlider
  timeStops : Array
The timeStops is an array of Dates used as ticks for the TimeSlider.
TimeSlider
Public Methods
 MethodDefined By
  
Creates a new TimeSlider.
TimeSlider
  
createTimeStopsByCount(timeExtent:TimeExtent, count:int = 10):void
Creates a specific number of time stops.
TimeSlider
  
createTimeStopsByTimeInterval(timeExtent:TimeExtent, timeInterval:Number, timeIntervalUnits:String):void
Creates time stops that are of a specific time interval.
TimeSlider
  
next():void
Continue to next time stop.
TimeSlider
  
pause():void
Pause the playing of the time slider.
TimeSlider
  
play():void
Start the playing of the time slider.
TimeSlider
  
previous():void
Go back to previous time stop.
TimeSlider
Events
 Event Summary Defined By
  Fires when the time extent of the slider has changed.TimeSlider
Skin Parts

This component uses skins made up of skin parts. Do not set the skin parts directly. The component's skin sets the skin parts.


 Skin Part Description Defined By
  
nextButton:spark.components.supportClasses.ButtonBase
Required: false Part Type: Static
An optional skin part for the next button
TimeSlider
  
pauseButton:spark.components.supportClasses.ButtonBase
Required: false Part Type: Static
An optional skin part for the pause button
TimeSlider
  
playButton:spark.components.supportClasses.ButtonBase
Required: false Part Type: Static
An optional skin part for the play button
TimeSlider
  
playPauseButton:spark.components.supportClasses.ToggleButtonBase
Required: false Part Type: Static
An optional skin part for a play/pause button. When the slider is playing, the selected property will be set to true. When the slider is paused or stopped, the selected property will be set to false.
TimeSlider
  
previousButton:spark.components.supportClasses.ButtonBase
Required: false Part Type: Static
An optional skin part for the previous button
TimeSlider
  
slider:mx.controls.sliderClasses.Slider
Required: true Part Type: Static
A required skin part that defines the Slider.
TimeSlider
Skin States

To skin the component, implement a skin that defines the following states. Although you must implement all skin states, a skin state can be empty. An empty skin state specifies no changes to the default skin state.


 Skin State Description Defined By
  
disabled
The disabled state of the TimeSlider component. TimeSlider
  
normal
The default (i.e., "normal") state of the TimeSlider component. TimeSlider
Property Detail
excludeDataAtLeadingThumbproperty
excludeDataAtLeadingThumb:Boolean

Since : ArcGIS API for Flex 2.2

When true, subtracts one second from the time extent's end time to exclude data at the exact end time instant.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get excludeDataAtLeadingThumb():Boolean
    public function set excludeDataAtLeadingThumb(value:Boolean):void
excludeDataAtTrailingThumbproperty 
excludeDataAtTrailingThumb:Boolean

Since : ArcGIS API for Flex 2.2

When true, adds one second to the time extent's start time to exclude data at the exact start time instant.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get excludeDataAtTrailingThumb():Boolean
    public function set excludeDataAtTrailingThumb(value:Boolean):void
fullTimeExtentproperty 
fullTimeExtent:TimeExtent  [read-only]

The full time extent from start time to end time.

This property can be used as the source for data binding.


Implementation
    public function get fullTimeExtent():TimeExtent
loopproperty 
loop:Boolean

Restart play from beginning after it reaches the last time stop. Allows for 'continous' play.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get loop():Boolean
    public function set loop(value:Boolean):void
playingproperty 
playing:Boolean  [read-only]

Returns true if TimeSlider is currently 'playing'.


Implementation
    public function get playing():Boolean
singleThumbAsTimeInstantproperty 
singleThumbAsTimeInstant:Boolean

If this is true and thumbCount is 1, then the timeExtent will represent a time instant.

The default value is false.

This property can be used as the source for data binding.


Implementation
    public function get singleThumbAsTimeInstant():Boolean
    public function set singleThumbAsTimeInstant(value:Boolean):void
thumbCountproperty 
thumbCount:int

The number of thumbs on the slider. Possible values are 1 or 2.

The default value is 1.

This property can be used as the source for data binding.


Implementation
    public function get thumbCount():int
    public function set thumbCount(value:int):void
thumbIndexesproperty 
thumbIndexes:Array

Current thumb location(s). If the thumbCount is two, two values will be returned.

This property can be used as the source for data binding.


Implementation
    public function get thumbIndexes():Array
    public function set thumbIndexes(value:Array):void
thumbMovingRateproperty 
thumbMovingRate:int

How fast to move from one time stop to the next time stop.

The default value is 1000 milliseconds.

This property can be used as the source for data binding.


Implementation
    public function get thumbMovingRate():int
    public function set thumbMovingRate(value:int):void
timeExtentproperty 
timeExtent:TimeExtent  [read-only]

Current time extent of the time slider 'thumbs'. If thumb count is 2, returns the time extent for the two thumbs of the current time slider. If the thumb count is 1, returns the first time stop and the current time stop. If the thumb count is 1 and singleThumbAsTimeInstant is true, returns the current time stop only.

This property can be used as the source for data binding.


Implementation
    public function get timeExtent():TimeExtent
timeStopsproperty 
timeStops:Array

The timeStops is an array of Dates used as ticks for the TimeSlider.

This property can be used as the source for data binding.


Implementation
    public function get timeStops():Array
    public function set timeStops(value:Array):void
Constructor Detail
TimeSlider()Constructor
public function TimeSlider()

Creates a new TimeSlider.

Method Detail
createTimeStopsByCount()method
public function createTimeStopsByCount(timeExtent:TimeExtent, count:int = 10):void

Creates a specific number of time stops.

Parameters

timeExtent:TimeExtent — Start and end time for time slider.
 
count:int (default = 10) — Number of time stops

createTimeStopsByTimeInterval()method 
public function createTimeStopsByTimeInterval(timeExtent:TimeExtent, timeInterval:Number, timeIntervalUnits:String):void

Creates time stops that are of a specific time interval.

Parameters

timeExtent:TimeExtent — Start and end time for time slider.
 
timeInterval:Number — Length of time interval - often 1 (as in every one day).
 
timeIntervalUnits:String — The time unit (for example, TimeInfo.UNIT_DAYS).

See also

next()method 
public function next():void

Continue to next time stop.

pause()method 
public function pause():void

Pause the playing of the time slider.

play()method 
public function play():void

Start the playing of the time slider.

previous()method 
public function previous():void

Go back to previous time stop.

Event Detail
timeExtentChange Event
Event Object Type: com.esri.ags.events.TimeExtentEvent
TimeExtentEvent.type property = com.esri.ags.events.TimeExtentEvent.TIME_EXTENT_CHANGE

Fires when the time extent of the slider has changed.

Defines the value of the type property of an timeExtentChange event object.