Select to view content in your preferred language

Time-enable a layer

422
2
08-30-2024 08:43 AM
JenniferWrightsell-Hughes
Esri Contributor
0 2 422

If you have spatial data that contains date fields, you can add it to your map in Map Viewer and animate it to see patterns or trends over time. Examples of time-based phenomena that are well suited for this purpose include hurricanes and other meteorological events; population migrations; land use and environmental changes; and crime incidents.

You can use the time slider in Map Viewer to visualize your time-based data. But first, you must ensure that your data layer is time-enabled. Some types of layers, such as hosted feature layers published from CSV files, must be time-enabled through the layer’s item page before you can access and configure the time slider.

How to enable time on a layer

To learn how to enable time on a layer, watch the following short video or follow the steps outlined below.video-thumbnail.jpg

Note: You must be the owner of the layer or an administrator to perform these steps.

1. Open the item page of the layer that contains time-based data.

2. On the Overview tab, scroll to the Layers section and click the name of the layer.

layers-section.jpg

3. Under Time settings, click Edit.

Edit-Enable-time.jpg

 

 

 

 

 

 

 

 

 

 

 

4. Check the Enable time check box.

5. Choose specific events in time or time ranges with a start and end time to record the time data.

6. To show specific events in time, choose a Date, Date only, or Timeset offset field. To show time ranges, choose fields for the start and end times.

time-settings-enabled.jpg

 

 

 

 

 

 

 

 

 

 

 

 

 

7. Click OK.

When the layer is added to Map Viewer, time animation is enabled, and you can customize it for your map by opening Map properties > Time slider options.

map-properties-time-settings.jpg

Learn more

To learn more about configuring time settings, including enabling time on a layer, see Configure time settings in the ArcGIS Online documentation. Explore more ArcGIS Online mapping videos in the Map Viewer playlist.

2 Comments
Chad_Ramos_TDEM
Occasional Explorer

Do you know if it is possible to enable time on a layer through the python API or some other automation method? I have a script periodically updating a hosted feature layer from an external table, and that hosted feature layer is tied to a map and then an Experience Builder app with a Timeslider widget to display the time-enabled data.  Everything works as is should, except that I have to re-enable time on the hosted feature layer every time the script overwrites the HFL from ArcPro.  I would like to be able to automate the process of enabling time on a layer and setting the fields for the time range.  

Thank you

JenniferWrightsell-Hughes
Esri Contributor

@Chad_Ramos_TDEM - I asked around and this is what I was told:

Python API should enable the time on the service after it is updated. If not, it should be a Python API enhancement.

and

For updating that timeinfo on the service maybe just could be required updateDefinition: {"timeInfo":{"startTimeField":"CreateDate"}

Hope this helps.

About the Author
Jennifer Wrightsell-Hughes is a product writer on the ArcGIS Online team. She has a degree in Journalism and over 20 years of experience creating and editing content, including product documentation, tutorials, blog articles, guides, and videos.