Error Message
After changing the source of a view layer in ArcGIS Online, opening the layer view in Map Viewer fails and returns the following error message:
Error:
Unable to add layer: Unable to establish a secure HTTPS connection to the layer. The layer, <layer name>, cannot be added to the map.
Cause
- The layer ID's are different between the two layers after switching the source for the view layer.
- The layer is corrupted.
Solution or Workaround
Match the layer ID in ArcGIS Pro
Note:
To determine the layer ID of a hosted feature layer, open the item details page of the hosted featue layer. In the URL section, click View
.
- Open the ArcGIS Pro project.
- In the Contents pane, right-click the map and click Properties.
- In the Map Properties dialog box, click the General tab.
- Check the Allow assignment of unique numeric IDs for sharing web layers check box.
- Click Apply and click OK.
- In the Contents pane, right-click the layer with the mismatching layer ID, and click Properties.
- In the Layer Properties dialog box, click the General tab.
- For the Layer ID parameter, input the matching layer ID of the source data.
- Click Apply and click OK.
- Overwrite the layer. Refer to ArcGIS Pro: Overwrite a web feature layer for further instructions.
Recreate and republish the layer
Delete the corrupted layer from ArcGIS Online and recreate the layer before republishing.