Applying a time offset to a time-aware feature layer


PurposeThis sample demonstrates how to apply an offset to a time-aware layer.

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/TimeAwareHurricanes.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 TimeAwareHurricanes.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 Time Offset button.
  4. Drag the Time Offset 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 time offset is 0.
  7. Click Cancel to close the properties panel.
  8. Click the Time Offset button.
  9. Reopen the properties of the atlantic_hurricanes_2000 layer. Note that the time offset has changed.

TimeOffsetButton.cs Contains the functionality to apply a time offset to a layer that is already time aware.
Download the C# files
TimeOffsetButton.vb Contains the functionality to apply a time offset to a layer that is already time aware.
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