English

Problem: ArcGIS Online does not display the shape area and shape length attributes of a feature layer

Description

ArcGIS Online has the capability to display the shape area and shape length attributes of a feature layer with the December 2016 Update. These are stored in the Shape__Area and Shape__Length fields in the feature layer's attribute table, and update each time a feature is edited or new features are created.

In some instances, the Shape__Area and Shape__Length fields might not visible in the attribute table of the feature layer.

Cause

The Shape__Area and Shape__Length fields might not be visible in the attribute table of a feature layer due to the following:

  • These fields are hidden when viewing the attribute table of a feature layer.
  • The feature layer was published before the December 2016 Update, when the ability to view these fields was implemented.

Solution or Workaround

To make the Shape__Area and Shape__Length fields visible, use one of the following options:

  • Unhide the fields in the attribute table. To view these fields, follow the steps below:
    1. In the Map Viewer, hover on the feature layer and click Show Table to open the attribute table.
    2. Click Options > Show/Hide Columns.
    3. Check the check box for Shape__Area and Shape__Length.
User-added image
 
Note: 
This option can also be done from the Data tab of the Item Details of the feature layer.
  • If the feature layer was published before December 2016, update the service definition of the hosted feature service.
Note: 
This option may not work for all hosted feature services and tends to work best when the service was originally published from ArcMap.
Use the workflow to Update the Service Definition, accessed through the Admin view of the REST endpoint of the feature service:
  1. Browse to the Admin view of the Layer of the feature service.
  2. Go to the Update Definition operation, and find the line for "supportsMultiScaleGeometry"
  3. Add a new line after it and type the following syntax: "hasGeometryProperties” : true,
  4. Click Update Layer Definition to apply the changes. After browsing back to Update Definition, the schema of the feature service should be updated as follows:
User-added image
Note: 
When applying edits through Update Layer Definition, the error "Invalid definition for 'LastEditDate'." may be received. To avoid this error, find "lastEditDate" in the syntax and change it to "LastEditDate" prior to clicking Update Layer Definition. 

Additional Considerations

Be aware that the values in the Shape__Area and Shape__Length fields of a feature layer in ArcGIS Online might be different when compared to the values of these fields in the same feature layer in ArcGIS Desktop or ArcGIS Pro. This is because ArcGIS Online uses the WGS 1984 Web Mercator (auxiliary sphere) coordinate system with meters as the units of measurement.
To calculate the area and length of the features with reference to a specific spatial reference in ArcGIS Online, use a custom basemap with the specific projection. Learn more: FAQ: Why are my map, distance and area measurements wrong when using WGS 1984 Web Mercator?

Related Information