摘要
This article describes the steps to use the Time Slider in a Portal for ArcGIS web map, and reconcile issues with non-spatial data and inconsistent time formatting in the source data. In this example, there is a Microsoft Access Database that includes a table with the following data:
- longitude
- latitude
- altitude
- date data
However the data is stored in a non-spatial table, and the time format is not consistent throughout the records.
过程
- From the MS Access database, export the table to Excel.
- Add the exported table to ArcMap. Refer to ArcMap: Adding tables to ArcMap for more information.
- After adding the table to the map, right-click it in the table of contents and click Display XY Data.
- Select the fields with longitude and latitude values for the X Field and Y Field respectively.
- After displaying the X,Y points, export the layer, and add it to the map. Refer to ArcMap: Exporting features for more information.
- Use the Define Projection tool to provide the layer with a spatial reference. In this example, the 'GCS_NAD_1983_2011' coordinate system is used.
- Open the attribute table. In the attribute table of the layer, note that the date style in the 'DATEUTC' field is not consistent, as shown in the image below.
- Click the Table Options button. Click Add Field.
- Create a new Date field. In this example, the new field is named DATE_UTC_NEW.
- Export all of the data from the old date field ('DATEUTC') to the new date field ('DATE_UTC_NEW').
- Open the Field Calculator on the new field.
- Double-click the old date field ('DATEUTC') field in the Fields list to add it.
- Click OK. Notice the consistency in the date style of the new date field ('DATE_UTC_NEW').
- Go to Layer Properties and check Enable time on this layer. Refer to ArcMap: Enabling time on your data for more information.
- Set the time properties of the layer. Refer to ArcMap: Setting the time properties on data for more information.
The layer is time-enabled. After publishing the layer and adding it to a web map, the Time Slider is at the bottom of the page:
Configure the Time Slider by pressing the settings icon on the right side of it and clicking Show Advanced Options.
Additionally, the Time Slider widget can be added to a web application in ArcGIS Web AppBuilder.