Set the time extents for a layer then render the layer


PurposeThis sample shows how to take a normal feature layer and make it time aware, then set the temporal extents on the map.

How to use

See How to use ArcGIS samples for help on compiling, setting up the debugger, and running the sample.

Data has been provided for your use with this sample. It can be found at <Your ArcGIS Developer Kit Install directory>/Samples/data/Time/BasicHurricanes.mxd.
If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Open the Visual Studio solution file and build the project. This will create a .dll and a type library (.tlb) file in the \bin folder. The .dll gets registered with the ESRI Add-Ins component category.
  2. Start ArcMap and load the BasicHurricanes.mxd map in the folder <Your ArcGIS Developer Kit Install directory>/Samples/data/Time.
  3. Open the Customize dialog box. On the Commands tab, select the Add-In Controls. The Add-In Controls appear, including the Set Time Extents button.
  4. Drag the Set Time Extents button onto one of the toolbars and close the Customize dialog box.
  5. Double-click atlantic_hurricanes_2000 to open the layer's properties.
  6. Click the Time tab. Note that the Enable time on this layer check box is not selected and none of the details on the time data are completed.
  7. Click OK to close the properties panel.
  8. Click the Set Time Extents button.
  9. Double-click atlantic_hurricanes_2000 to open the layer's properties.
  10. Note that the layer is now time-enabled. All of the details have been completed and the Enable time on this layer check box is selected.
  11. Click OK to close the properties panel.
  12. Click the Time slider button and try dragging the slider to a particular time on the timeline. Note that the map updates with the content appropriate for that point in time.

SetTimeExtentsButton.cs Contains the functionality to make a layer time aware and set the map's time extents.
Download the C# files
SetTimeExtentsButton.vb Contains the functionality to make a layer time aware and set the map's time extents.
Download the VB.NET files

Download the files for all languages




Development licensing Deployment licensing
ArcGIS for Desktop Basic ArcGIS for Desktop Basic
ArcGIS for Desktop Standard ArcGIS for Desktop Standard
ArcGIS for Desktop Advanced ArcGIS for Desktop Advanced