HOW TO

Copy symbology and apply to it another feature layer in ArcGIS Online

Last Published: October 4, 2023

Summary

In some cases, when importing layers from another project in ArcGIS Online, the symbology is not preserved. This article highlights the workflow to transfer symbology from a feature layer to another layer in the admin REST endpoint in ArcGIS Online by copying its JSON script.

Procedure

  1. Copy the JSON script of the symbology.
    1. In ArcGIS Online, navigate to Content > My Content.
    2. On the My Content tab, select the item to open its item details page.
Select the item to open its item details page
  1. On the item details page, select and click the feature layer containing the symbology.
Select the feature layer containing the symbology
  1. Scroll down to the URL section and click View. The page redirects to ArcGIS REST Services Directory.
Click View
  1. On the ArcGIS REST Services Directory page, under Layers, select and click the layer with the desired symbology. This article uses malaysia_poi as an example.
ArcGIS REST Services Directory page
  1. Navigate to the Drawing Info section and copy the JSON script.
From the Drawing Info, copy the JSON script
  1. Transfer the copied JSON script to another layer.
    1. Repeat step 1c through 1f. In step 1f, select the desired layer. This example uses malaysia_location.
Note:
To edit the JSON script, access the ArcGIS REST Administrator Directory.
  1. On the ArcGIS REST Services Directory page, in the browser address bar, replace ‘/rest/services/’ with ‘/rest/admin/services/’. Reload the page.
The address bar for ArcGIS REST Services Directory admin access
  1. Scroll down the page, under Supported Operations, click Update Definition.
Click Update Definition
  1. In the Update Layer Definition box, clear out the existing content. Add an opening curly bracket { in the first line, in the next line, type  "drawingInfo":{ , then paste the JSON script from the first layer to the and add a closing curly bracket at the end } (similar to the format shown in the example and screenshot below).
{
    "drawingInfo":{"renderer":{"type":"simple","symbol": 
{"type":"esriSMS","style":"esriSMScircle","color": 
[128,0,123,255],"size":4,"angle":0,"xoffset":0,"yoffset":0,"outline":"{"color":
[0,0,0,255],"width":1}}},"scaleSymbols":false,"transparency":0,"labelingInfo":null}
}
  1. Select True for ASync and select JSON for Format. Click Update Layer Definition.
2023-10-04_10-02-16.png
* If the schema of your layers don't match, for example if the second layer is missing a field or a domain that is used in the symbology (i.e. referenced in the drawing info), updating layer definition may still return success but the symbology of the layer won't change. 

Article ID:000027205

Software:
  • ArcGIS Online

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic