Select to view content in your preferred language

Time

1272
5
05-24-2011 07:55 AM
gabrielvazquez
Deactivated User
Require assistance
0 Kudos
5 Replies
JenniferNery
Esri Regular Contributor
Can you be more specific? How can we help you?
0 Kudos
gabrielvazquez
Deactivated User
Jennifer,
I apologize, I didn't mean to start this thread. I was originally going to request information pertaining to the earthquakes layer used in the Silver light Time-Feature Layer example. However, I was able to just look up the layer through the Rest service and answered my question.

But now I have another question if someone can explain it to me. I was studying the XAML and C# code associated with the Time slider  Feature Layer example (http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#TimeFeatureLayer) and I am confused in regards to how the time slider understands how to use one of the two time fields (Date_ or YYYYMMDD) within the earthquakes layer. I am attempting to apply this feature to a local incident layer we have and just trying to understand it more.

Am I overlooking something in the code, where it specifically says use this field "Date_" or "YYYYMMDD" for the timeslider input? Is it defined within the XAML below or somewhere else? If so I still am confused as to how it understands what fields to use within the layer. If someone can assist me in understanding, it would be great. And I apologize, I am still a newbie programmer in regards to C# and Silverlight(XAML).

<esri:TimeSlider x:Name="MyTimeSlider"
      Height="20" TimeMode="TimeExtent"
                        MinimumValue="{Binding ElementName=MyMap, Path=Layers[EarthquakesLayer].TimeExtent.Start, Mode=OneWay}"
         MaximumValue="{Binding ElementName=MyMap, Path=Layers[EarthquakesLayer].TimeExtent.End, Mode=OneWay}"
                        Value="{Binding ElementName=MyMap, Path=Layers[EarthquakesLayer].TimeExtent, Mode=OneWay}" >
                    </esri:TimeSlider>
0 Kudos
DominiqueBroux
Esri Frequent Contributor
The tip is that the StartTime and EndTime fields are provided in the metadata of a feature layer (and are not modifiable). For example with http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/Since_1970/MapServer/0 the start time field field is called 'Date_'.

So, as a developer, you don't have to take care of that. You just need to set the TimeExtent of the map (generally by a binding to a time slider) and that's it. The time extent is then propagated to all time aware layers of the map.
0 Kudos
gabrielvazquez
Deactivated User
Dominique,
OH OK. I see so when you say I guess I can see the time information defined as below. I take it that I define  this within the layer properties, Time tab. I will test it. Thank you for the info.

Start Time Field: Date_
End Time Field: N/A
Track ID Field: N/A
Time Extent: [1970/01/04 00:00:00 UTC, 2009/05/28 00:00:00 UTC]
Time Reference: N/A
Time Interval: 1 (esriTimeUnitsYears)
Export Options:

Use Time: True
Time Data Cumulative: False
Time Offset: 0
0 Kudos
gabrielvazquez
Deactivated User
Dominique,
OH OK. I see so when you say I guess I can see the time information defined as below. I take it that I define  this within the layer properties, Time tab. I will test it. Thank you for the info.

Start Time Field: Date_
End Time Field: N/A
Track ID Field: N/A
Time Extent: [1970/01/04 00:00:00 UTC, 2009/05/28 00:00:00 UTC]
Time Reference: N/A
Time Interval: 1 (esriTimeUnitsYears)
Export Options:

Use Time: True
Time Data Cumulative: False
Time Offset: 0


Thanks for the Help. We were able to get the slider to work.
0 Kudos