ArcGIS API for Silverlight - Library Reference
TimeOption Class
Members  See Also  Send comments on this topic
ESRI.ArcGIS.Client.Tasks Namespace : TimeOption Class

Contains properties to indicate how to render an individual sub-layer of a time-enabled ArcGISDynamicMapServiceLayer.

Object Model

TimeOption Class

Syntax

Visual Basic (Declaration) 
Public NotInheritable Class TimeOption 
C# 
public sealed class TimeOption 

Remarks

The TimeOption object indicates whether or not the sub-layer of an ArcGISDynamicMapServiceLayer should use the TimeExtent specified by the time parameter or not (see TimeOption.UseTime and LayerTimeOptionCollection), whether to draw the layer features cumulatively or not (see TimeOption.TimeDataCumulative), and if any time offsets will be used for the layer (see TimeOption.TimeOffset).

Using the Read/Get of the ArcGISDynamicMapServiceLayer.LayerTimeOptions Property returns null/Nothing unless it has been explicitly set by the developer (it is not automatically set as a Property in the ArcGIS Server web service for the ArcGISDynamicMapServiceLayer). Developers need to create a new LayerTimeOptionCollection, add the TimeOption object(s) to it, and then set the new LayerTimeOptionCollection to the ArcGISDynamicMapServiceLayer.LayerTimeOptions Property. An ArcGISDynamicMapServiceLayer can have multiple TimeOption objects; one for each sub-layer in the ArcGISDynamicMapServiceLayer.

It is the Map.TimeExtent that controls what features are displayed based upon the temporal information in the ArcGISDynamicMapServiceLayer. The Map.TimeExtent acts as to limit the features displayed based upon the window-of-time specified by the TimeExtent.Start and TimeExtent.End. One analogy you can think of is that the Map.TimeExtent is like a window in a house. Depending on the size of the window, allows how much you can see outside (i.e. the features in the ArcGISDynamicMapServiceLayer). See the visual analogy depiction.

Analogy of how the Map.TimeExtent limits the temporal features being displayed in a layer is like looking out a window only allow certain visual images to be seen based upon the size of the window.

The ArcGISDynamicMapServiceLayer.LayerDefinitions take precedence over other data restriction techniques like those of the ArcGISDynamicMapServiceLayer.LayerTimeOptions. In other words, the ArcGISDynamicMapServiceLayer.LayerDefinitions acts to limit the data in the ArcGISDynamciMapServiceLayer that the ArcGISDynamicMapServiceLayer.LayerTimeOptions can operate on.

If the TimeOption.TimeDataCumulative = True then the data in the ArcGISDynamicMapServiceLayer returned is based upon the TimeExtent.Start of the REST service. If the TimeOption.TimeDataCumulative = False then the data in the ArcGISDynamicMapServiceLayer returned is based upon TimeExtent.Start of the Map Control.

If the TimeOption.UseTime = True then the data in the ArcGISDynamicMapServiceLayer returned is based upon occurrences between the TimeExtent.Start and TimeExtent.End of the Map Control. If the TimeOption.UseTime = False then time based queries are disabled for the ArcGISDynamicMapServiceLayer (meaning all of the records will be returned subject to any LayerDefinitons that may be set).

The TimeOption.LayerId is a String. Developers should cast the ArcGISDynamicMapServiceLayer.Layers.ID (an Integer) to a String when setting the TimeOption.LayerId.

Normally the Map.TimeExtent determines what features will be displayed for a time-enabled ArcGISDynamicMapServiceLayer. The TimeOption.TimeOffset is a special case where the features that are returned will be offset from what is specified in the Map.TimeExtent by the TimeOffset amount based upon specific TimeOption.TimeOffsetUnit denomination. Negative TimeOffset values are possible for returning features of previous times to the currently set Map.TimeExtent.

NOTE: A change was made to ArcGIS Server 10.02 (i.e. 10.0 Service Pack 2) and subsequents future versions that impacts what is needed to draw ALL features in an ArcGISDynamicMapServiceLayer that is time-enabled. Prior to ArcGIS Server 10.02, it was required in order to see the ALL features for a time-enabled ArcGISDynamicMapServiceLayer in a Map Control to either:
(1) set the Map.TimeExtent to a valid time that covered the features in the ArcGISDynamicMapServiceLayer
OR
(2) if no Map.TimeExtent was set on the Map Control, then each TimeOption for the sub-layer of the ArcGISDynamicMapServiceLayer needs to have the TimeOption.UseTime Property set to False.
As of ArcGIS Sever 10.02 and higher, the time-enabled ArcGISDynamicMapServiceLayer will automatically show ALL features, even if no Map.TimeExtent is set. See the code example in the ArcGISDynamicMapServiceLayer.LayerTimeOptions document for a demonstration.

Inheritance Hierarchy

System.Object
   ESRI.ArcGIS.Client.Tasks.TimeOption

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7

See Also

© ESRI, Inc. All Rights Reserved.