ArcGIS Online

Configuring Time in ArcGIS Online

Sometimes when you publish a layer to ArcGIS Online the time settings are disabled or the time interval is not appropriate for the data.  You can easily modify these settings in ArcGIS Online.

If you take a look at a layers REST you can learn more about the associated settings.

Here is an example layer with time enabled: Elephant Seal Track Points

Service Description Time Settings
REST Time Properties

While examining the layer’s REST, notice that the time is enabled and the “Time Interval Units” are defined. When this layer is added to a map a time slider with the associated interval of a single day is made available by default.

Let’s walk through a workflow that publishes time enabled animal telemetry data to ArcGIS Online where we enable time and configure the interval and units.  This way when the layer is added to a map or app it will have the proper behavior with time friendly sliders and widgets.

Example

Using an example dataset from the Animal Telemetry Network (ATN) let’s walk through the process of creating a time enabled layer and configuring the settings in ArcGIS Online.

NOAA’s ERDDAP is a data server that gives you a simple, consistent way to download subsets of gridded and tabular scientific datasets in common file formats and make graphs and maps. We will obtain ATN data from NOAA ERDDAP to publish in ArcGIS Online. The following ERDDAP request accesses and downloads the past 5 years worth of ATN data into a CSV file.

ERRDAP Request

Once you have the file we can easily upload it to ArcGIS Online and create our layer (hosted feature class).
*Must have publishing privileges in ArcGIS Online.

1. From your content page in ArcGIS Online. Click on the “Add Item”

AGOL Add Item
Add Item in ArcGIS Online

2. Upload the file from “my computer”. Use the following recommended name and tags.

Item Info
Item Info

3. Ensure that “Publish as Hosted Feature Layer” is checked
4. Click on “Add Item” at the bottom of the window. This will begin publishing the file to ArcGIS Online.
5. When publishing is complete you should be brought to the content item page of the newly published layer (below).

Service URL
Content Item Service URL

6. Navigate to the Service URL and click on it. This will launch the REST in a new window.

REST Time Properties disabled
REST Time Properties disabled

7. Scroll down and notice there are no time properties listed. Note: these properties would normally show up after “HasM:“.

Content Item Time Settings
Content Item Time Settings

8. Now let’s enable time by navigating to the time settings of the layer and modifying the time settings by clicking on “Time Settings”.

9. Check the box that says “Enable Time” and select the “date” field as the Time Field.

Time settings on your layer
Time settings on your layer

10. Now time is enabled on the layer and we can verify by inspecting the service URL.

Time enabled
Time enabled

11. Notice the time properties are now enabled but the interval and units are not set. When this layer is added to a Map it tries to automatically select the time slider range; and it is often incorrect. To avoid these you can configure the interval and units through the ArcGIS Online Admin console.

12. Since you are already at the service URL – you can modify the URL by adding “admin/” between “rest/” and “services”

Admin console
Admin console

13. This will bring you to the “admin console” for your layer. Here you can modify the time settings. The admin console presents the data in the same fashion as the Service URL but has some key features located at the bottom of the page that let you refresh, add, update, or delete from the definition. As long as you are the owner of the item you should be able to make use of these settings.

Admin console operations
Admin console operations

14. Use “Update Definition” to modify the time interval and units.

15. This brings up the Update Layer Definition interface where the service properties are listed. It’s important to note that since we are only modifying/updating the time properties, those are the only properties that should be referenced in the definition (remove everything else not associated with time from the definition).

Time Definition
Time Definition

16. The Service Definition timeInfo settings (above) modified to “timeInterval”: 1 and “timeIntervalUnits”: “esriTimeUnitsDays”.

17. Now when the layer is added to the map the time slider settings represent the proper range for the data.

 

Other Resources

ArcGIS Online Example Layer
Animal Telemetry Network Website
NOAA ERDDAP
NOAA ERDDAP request to obtain last 5 years of records in CSV format
Esri Time Units

About the author

Keith is a Product Engineer at Esri. He serves as the Ocean Curator for the Living Atlas of the World team. Keith works to create foundational layers that can help marine researchers, scientists, and others gain a better understanding of our oceans.

Connect:
0 Comments
Inline Feedbacks
View all comments

Next Article

Drawing a Blank? Understanding Drawing Alerts in ArcGIS Pro

Read this article