Error: The layer, <layer_name>, cannot be added to the map
In ArcGIS Online, when viewing an existing web map in Map Viewer Classic, the following error message is returned:
Error: The layer, <layer_name>, cannot be added to the map.
There are several reasons for this issue. Refer to GeoNet: Troubleshooting “Error: The layer, [layername], cannot be added to the map” in ArcGIS Online for more information.
Additionally, the error message is returned when one or more layers on the web map are inaccessible in ArcGIS Online Map Viewer Classic due to but not limited to the following causes:
- The layer is not shared with the related group or restricts public access.
- The layer is no longer available in the related group.
- The layer has been deleted in ArcGIS Online.
- The layer restricts non-administrator member access.
- The browser cache on the machine is not cleared.
Solution or Workaround
Depending on the cause, use one of the options below to resolve the issue.
Ensure all layers on the web map are shared with the intended viewers
- Share all layers on the web map with the related groups. Refer to ArcGIS Online: Share items with a group for more information.
- Share all layers on the web map with the public. Refer to ArcGIS Online: Share items with everyone for more information.
Save the web map without the inaccessible layer
Save the web map without the inaccessible layer if it is no longer needed. Refer to ArcGIS Online: Save maps (Map Viewer Classic) for more information.
Note: It is not possible to recover a deleted item in ArcGIS Online. A preventive measure is to enable the ‘Delete Protection’ setting for the item. Refer to ArcGIS Blog: How to prevent accidental deletion for more information.
Remove and re-add the layer to the web map
In Map Viewer Classic, remove and re-add the layer to the web map.
- In Map Viewer Classic, in the Contents pane, browse to the layer, and click Remove.
- When prompted, click YES, REMOVE LAYER.
- On the top panel, click Add > Search for Layers.
- In the My Content pane, browse to the hosted feature layer, and click Add to add it to the web map.
- Click Save > Save to save the map.
Update the member’s default or custom role to enable administrative privileges
Note: Only an organization's administrator can perform the following workflows.
- Change the member’s role to a default Administrator role to view the restricted layer on the web map. Refer to ArcGIS Online: Change member roles for more information.
- Update the member’s custom role to enable the View all option in the Administrative privileges settings. Refer to ArcGIS Online: Configure member roles for more information.
Clear the web browser cache
Clear the browsing history and cache on the machine to ensure a smooth performance of the browser.
Note: It is sometimes necessary to use the incognito tab or other browsers to access the web map in Map Viewer Classic.
- Problem: ArcGIS Online web map hangs indefinitely after clicking the Settings tab on the Item Details page
- FAQ: Is it possible to retrieve a deleted feature service from ArcGIS Online?
- ArcGIS Online: Protect shared content
- ArcGIS Online: Own groups
- ArcGIS Online: User types, roles, and privileges
Last Published: 1/13/2022
Article ID: 000017323
Software: ArcGIS Online Current