How To: Configure Portal for ArcGIS with custom symbology
Summary
The Portal for ArcGIS map viewer comes with a series of default Esri symbol sets that meet the needs of most organizations. If custom symbology is required, the steps below describe a method to configure the map viewer settings to use custom symbol sets.
Procedure
Custom symbol sets are stored as items in a group. The map viewer searches for the group and then uses the symbol set items within it to populate the sets available.
Check the prerequisites for this workflow
Administrator privileges to the portal are required.
A web server in the organization must be configured with HTTPS. Permissions to create a virtual directory on the web server and read/write to the directory are required. The directory must be accessible by Portal for ArcGIS.
Create a group to contain the symbol sets
Log in to the Portal for ArcGIS website as an administrator of the organization.
Create a group to contain the custom symbology, for example 'Custom Symbols'. This must be be accessible to everyone that uses the map viewer. Record the name of the group, as this is needed later. For details, see Create groups.
Log in to the ArcGIS Portal Directory as an administrator of the organization. The URL is formatted as follows:
https://webadaptor.domain.com/arcgis/sharing/rest
In the upper-right corner of the page, click the account name.
In the User Groups section, click the name of the group created above and record the ID of the group for later use.
Configure the symbol set items
Two separate items must be created for each symbol set added to the group. The title property must be the same for both items. This first item is for browsers that reference the symbols by value. The second item is for browsers that reference the symbols by URL.
Repeat the steps in this section to add additional custom symbol sets to the group. Distinguish each pairing of symbol set items using the title property.
Create the 'by value' item
In the upper-right corner of the page, click the account name.
At the bottom of the page, click User Content.
In the User Content page, click Add Item.
In the Add Item page, specify a title for the item using the Title field. This is meaningful, as it is displayed in the map viewer.
Specify the following information exactly as noted below:
Tags: Symbol Set
Type Keywords: marker, Symbol Set
Type: Symbol Set
If you want to display this symbol set as the default, add 'default' to the Type Keywords field.
Click Add Item.
Click Share Item.
Share the item with everyone. In the group field, enter the ID of the group created above.
Create the URL item
In the upper-right corner of the page, click the account name.
At the bottom of the page, click User Content.
In the User Content page, click Add Item.
In the Add Item page, enter the same title specified for the 'by value' item. The title must match the by value item exactly.
Specify the following information exactly as noted below:
Type: Symbol Set
Type Keywords: by value, marker, Symbol Set
Tags: Symbol Set
If this is the default symbol set for the portal, add 'default' to the Type Keywords field.
Click Add Item.
Click Share Item.
Share the item with everyone. In the group field, enter the ID of the group created above.
Create and publish custom symbols
In ArcMap, create a map that contains the custom symbology to be added to the symbol set. For more information, see What are symbols and styles?
Once the symbols have been published, download and host them on a web server in the organization. This is necessary to remove the dependency on the feature layer; the symbols are instead accessed from the web server.
Create a virtual directory on the web server to contain the symbols. Verify read/write access to this directory and that it can be accessed by Portal for ArcGIS.
Verify that the directory can be accessed via HTTPS.
Log in to the ArcGIS Server Services Directory as an administrator of the organization. The URL is formatted
Click the Hosted folder and then click the name of the service published as a feature layer.
Under Layers, click the first layer.
Under Drawing Info, right-click each symbol and save to the virtual directory created on the web server.
Repeat steps e and f for any additional layers.
Insert symbols into the symbol set
Now that the symbols are hosted on the web server, the next step is adding them to the symbol set items created above. This process is complex and requires editing JSON. Access a text editor and the following resources before beginning.
Now that the symbol set JSON has been validated, the JSON can be uploaded to each symbol set item. Remember, there are two symbol set items: the 'by value item' and the 'URL item'. Each must be updated with the validated JSON.
Log in to the ArcGIS Portal Directory as an administrator of the organization. The URL is formatted,.
https://webadaptor.domain.com/arcgis/sharing/rest
In the upper-right corner of the page, click the account name.
At the bottom of the page, click User Content.
In the items list, click the name of a symbol set item.
Click Update Item.
In the Text field, paste the minimized JSON.
Click Update Item.
Repeat these steps for the second symbol set item. Repeat these steps for any additional custom symbol sets created for the portal. Each symbol set requires the validated JSON and each symbol set item must be updated.
Expose custom symbols
Now that all of the symbol sets have been updated, the last step is to configure the portal to expose the custom symbol sets in the map viewer. By default, it exposes the default Esri sets. Remove the default sets and replace them with the custom sets managed by the custom symbology group.
Log in to the ArcGIS Portal Directory as an administrator of the organization. The URL is formatted:
https://webadaptor.domain.com/arcgis/sharing/rest
Click the organization ID.
At the bottom of the page, click Update.
Locate the Symbol Sets Group Query field and update to the following:
title: "<name of custom symbols group>" AND owner: <group owner user name>
For example:
title: "Custom Symbols" AND owner: "admin"
Click Update Organization.
The custom symbols are now available in the map viewer. It may be necessary to clear the browser cache to confirm that the custom symbol sets are exposed. Optionally, delete the feature layer created. It is no longer needed.
Note:
If it is necessary to revert back to the default Esri symbol sets, repeat the steps above and update the Symbol Sets Group Query field with title: "Esri Symbols" AND owner: "esri_en".