PROBLEM

Labels of feature classes in ArcGIS Pro are not retained when publishing to ArcGIS Online

Last Published: July 16, 2021

Description

In ArcGIS Pro, when publishing map to ArcGIS Online, the labels display differently in ArcGIS Online Map Viewer.

The following image displays the example of the labels for the feature class in ArcGIS Pro.

The example of the labels for the feature classes being displayed in ArcGIS Pro.

The following image displays the example of the labels for the published feature layer in ArcGIS Online Map Viewer.

The example of the labels for the feature classes being displayed in ArcGIS Online.

Cause

  • The label used in ArcGIS Pro is the default Shape_Length or Shape_Area field. The format of the field names for Shape_Area and Shape_Length changes after publishing the layer from ArcGIS Pro to ArcGIS Online. ArcGIS Online uses Shape__Length and Shape__Area with two underscores instead of one.
  • The label class name generated from the layer attributes contain special characters or spaces.

Solution or Workaround

Choose one of the options below depending on the cause to resolve the issue.

Populate the Shape_Length or Shape_Area field values in a new field

  1. In ArcGIS Pro, right-click the desired layer, and click Attribute Table.
  2. Click Add to create a new field. Refer to ArcGIS Pro: Create and manage fields for more information. Click Save.
A new field is created in the attribute table to populate the Shape_Length value.
  1. In the attribute table, right-click the newly created field heading, and click Calculate Field.
  2. In the Calculate Field window, select the feature layer for Input Table, the field name of the newly created field for Field Name (Existing or New), and Python 3 for Expression Type.
  3. Under Fields, double-click the original field name to copy the attributes into the new field.
  4. Click Apply, then click OK.
The Calculate Field window with the parameters and expression to populate the new field with values from the Shape_Length field.
  1. Label the features using the newly created field. Refer to ArcGIS Pro: Labeling basics for more information.
  2. Republish the layer to ArcGIS Online or overwrite the published feature layer to display the feature labels in ArcGIS Online Map Viewer.

Remove the special characters or spaces from the layer attributes

  1. In ArcGIS Pro, right-click the layer, and click Attribute Table.
  2. In the attribute table, remove the special characters or spaces from the attribute fields. Refer to FAQ: What characters should not be used in ArcGIS for field names and table names? for more information.
  3. Create a new unique values symbology and label class. Ensure there are no special characters or spaces in the label class name.
  4. Republish the layer to ArcGIS Online or overwrite the published feature layer to display the feature labels in ArcGIS Online Map Viewer.
Note:
The label class name issue only occurs in ArcGIS Online Map Viewer Classic. Alternatively, open the layer in the new Map Viewer to display the labels properly.

Article ID: 000025402

Software:
  • ArcGIS Online
  • ArcGIS Pro 2 8 x
  • ArcGIS Pro 2 7 x
  • ArcGIS Pro 2 x

Receive notifications and find solutions for new or common issues

Get summarized answers and video solutions from our new AI chatbot.

Download the Esri Support App

Related Information

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options