HOW TO

Configure Portal for ArcGIS with custom symbology

Last Published: January 25, 2023

Summary

Portal for ArcGIS Map Viewer Classic 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.

Note:
If you are working with ArcGIS Pro and the new map viewer  in ArcGIS online or Enterprise 10.9.1 please see this recommended workflow: Use Published 2D Symbols in ArcGIS Online

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.

  1. Check the prerequisites for this workflow.

  2. Create a group to contain the symbol sets.

    1. Log in to the Portal for ArcGIS website as an administrator of the organization.
    2. 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. Refer to Portal for ArcGIS: Create groups for more information.
    3. 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
  1. In the upper-right corner of the page, click the account name.
  2. In the User Groups section, click the name of the group created above and record the ID of the group for later use.
  1. 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.

  2. Create the 'by value' item.

    1. In the upper-right corner of the page, click the account name.
    2. At the bottom of the page, click User Content.
    3. In the User Content page, click Add Item.
    4. 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.
    5. Specify the following information exactly as noted below:
      • Tags: Symbol Set
      • Type Keywords: marker, Symbol Set
      • Type: Symbol Set
    6. If you want to display this symbol set as the default, add 'default' to the Type Keywords field.
    7. Click Add Item.
    8. Click Share Item.
    9. Share the item with everyone. In the group field, enter the ID of the group created above.
  3. Create the URL item.

    1. In the upper-right corner of the page, click the account name.
    2. At the bottom of the page, click User Content.
    3. In the User Content page, click Add Item.
    4. In the Add Item page, enter the same title specified for the 'by value' item. The title must match the by value item exactly.
    5. Specify the following information exactly as noted below:
      • Type: Symbol Set
      • Type Keywords: by value, marker, Symbol Set
      • Tags: Symbol Set
    6. If this is the default symbol set for the portal, add 'default' to the Type Keywords field.
    7. Click Add Item.
    8. Click Share Item.
    9. Share the item with everyone. In the group field, enter the ID of the group created above.
  4. Create and publish custom symbols.

    1. In ArcMap, create a map that contains the custom symbology to be added to the symbol set. Refer to ArcMap: What are symbols and styles? for more information.
    2. Publish the map as a feature layer to the portal. Refer to Portal for ArcGIS: Publish hosted feature layers for more information.
  5. Host the custom symbols.

    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.

    1. 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.
    2. Verify that the directory can be accessed via HTTPS.
    3. Log in to the ArcGIS Server Services Directory as an administrator of the organization. The URL is formatted
https://gisserver.arcgis.com:6443/arcgis/rest/services
  1. Click the Hosted folder and then click the name of the service published as a feature layer.
  2. Under Layers, click the first layer.
  3. Under Drawing Info, right-click each symbol and save to the virtual directory created on the web server.
  4. Repeat steps e and f for any additional layers.
  1. 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.

    1. Log in to the ArcGIS Server Services Directory as an administrator of the organization. The URL is formatted.
https://gisserver.arcgis.com:6443/arcgis/rest/services
  1. Click the Hosted folder and then click the name of the service published as a feature layer.
  2. Under Layers, click the first layer.
  3. In the upper-left corner, click JSON. A raw view of the feature layer JSON is displayed.
  4. Search for the 'uniqueValueInfos' property.
  5. Beginning at the first open bracket after the property, copy all of the JSON info up to the closing bracket of the property. For example:
"uniqueValueInfos": [
   {
      Symbol0
      ...
   },
   {
      Symbol1
      ...
   },
]
  1. Paste the content into a JSON validator.
  2. Remove the following properties from each symbol definition JSON:
    • value
    • label
    • description
    • symbol
  3. Repeat steps a through h for any additional layers.
  4. Validate the JSON. Correct any errors. The validated JSON should look like this:
[
    {
        "type": "esriPMS",
        "url": " d06b3aed-db09-4d17-b485-48596e3c925d",
        "imageData": "iVBORw0KGgoAAAANSUhEUgAAABwAAAAc...",
        "contentType": "image/png",
        "width": 21,
        "height": 21,
        "angle": 0,
        "xoffset": 0,
        "yoffset": 0
    }
]
  1. Copy and paste the validated JSON into a text editor.
  2. Update the JSON URL property to match the URL of the symbols hosted on the web server, for example:
"url": "https://webserver.domain.com/custom/hydrant.png",
  1. Validate the JSON and correct any errors.
  2. Minimize the JSON. Copy this content.
  1. Add validated JSON to symbol sets.

    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.

    1. Log in to the ArcGIS Portal Directory as an administrator of the organization. The URL is formatted.
 https://webadaptor.domain.com/arcgis/sharing/rest
  1. In the upper-right corner of the page, click the account name.
  2. At the bottom of the page, click User Content.
  3. In the items list, click the name of a symbol set item.
  4. Click Update Item.
  5. In the Text field, paste the minimized JSON.
  6. Click Update Item.
  7. 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.
  1. 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.

    1. Log in to the ArcGIS Portal Directory as an administrator of the organization. The URL is formatted:
https://webadaptor.domain.com/arcgis/sharing/rest
  1. Click the organization ID.
  2. At the bottom of the page, click Update.
  3. 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"
  1. Click Update Organization.

The custom symbols are available in Map Viewer Classic. 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 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".

Article ID:000012539

Software:
  • Portal for ArcGIS

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options

Related Information

Discover more on this topic