Work with Symbols

Symbols represent geometries on a map. Like geometries, symbols are usually associated with features—the geometry defines the feature's location and shape, and the symbol defines how to represent the geometry on the map. For example, you could use green circles to represent recycling depots, or you could fill flood-damaged parcels with blue.

To assign a symbol to a feature, you use the Set Feature Symbol activity, described in Set the Value for a Component. If the symbol already exists in the workflow, you can assign the existing symbol to the feature. For example, if the workflow already has a feature set with the desired symbol, set the Symbol input in the Set Feature Symbol activity to the existing symbol using an expression like one described in Use an Expression to Access a Feature or its Components.

If the symbol doesn't already exist in the workflow, you can create a new symbol using the Get Symbol From JSON activity, and then assign the symbol to the feature.

The type of symbol that you create depends on its purpose—different geometries call for different symbols, and three-dimensional maps use different symbols than two-dimensional maps. You can use the Get Symbol From JSON activity to create any of the symbols described in the Esri documentation.

Whatever type of symbol you decide to use, you can create the symbol by copying the JSON definition directly into the Get Symbol From JSON activity's Json input in Workflow Designer.

JSON definition of a symbol in the Get Symbol From JSON activity's Json input

Every symbol has a type property that defines what type of symbol it is. The other properties depend on the symbol type. Some of the properties are:

See also...

Esri Symbol 3.x 4.x

JSON for Symbols

Set the Symbol for a Feature

The Set Feature Symbol activity assigns a symbol to a feature. To use this activity, the symbol must already exist in the workflow.

To configure the Set Feature Symbol activity:

  1. In the Feature input, specify the feature using one of the forms described in Use an Expression to Access a Feature or its Components.

    For example, if you got the feature set from JSON, set the Features input to an expression similar to: =$featureSet1.featureSet.features[0]

  2. Set the Symbol input to the symbol that you want to assign to the feature.

    For example, if you created the symbol using the Get Symbol From JSON activity: =$symbol1.symbol

Access a Feature’s Symbol

To access the symbol for a particular feature in a feature set, you use an expression. The term that you use depends on which activity the feature set came from:

Create a Simple Marker Symbol

Simple marker symbols are simple geometric shapes like circles, squares, or diamonds. They can be used to represent points in two-dimensional maps. To define a simple marker symbol, set the type property to esriSMS.

Example- JSON for a Simple Marker Symbol

This example shows the JSON for a simple marker symbol ("type" : "esriSMS"). The symbol has the following properties:

{
   "type": "esriSMS",
   "style": "esriSMSCross",
   "color": [255,0,0,255],
   "size": 10,
   "angle": 0,
   "xoffset": 0,
   "yoffset": 0,
   "outline": 
   {
      "color": [0,0,0,255],
      "width": 1
   }
}

Create a Simple Line Symbol

Simple line symbols are used to represent polylines in two-dimensional maps. You can also use simple line symbols for the outlines of simple fill symbols. To define a simple line symbol, set the type property to esriSLS.

Example - JSON for a Simple Line Symbol

This example shows the JSON for a simple line symbol ("type": "esriSLS"). The symbol has the following properties:

{
   "type": "esriSLS",
   "style": "esriSLSSolid",
   "color": [0,255,255,200],
   "width": 4
}

Create a Simple Fill Symbol

Simple fill symbols are used to represent polygons in two-dimensional maps. To define a simple fill symbol, set the type property to esriSFS.

Example - JSON for a Simple Fill Symbol

This example shows the JSON for a simple fill symbol ("type": "esriSFS"). The symbol has the following properties:

{
   "type": "esriSFS",
   "style": "esriSFSSolid",
   "color": [255,255,0,100],
   "outline": 
   {
      "style" : "esriSLSDash",
      "color": [255,165,0,200],
      "width": 2
   }
}

Create a Picture Marker Symbol

Picture marker symbols are images that are used to represent points in two-dimensional maps. To define a picture marker symbol, set the type property to esriPMS.

Example - JSON for a Picture Marker Symbol

This example shows the JSON for a picture marker symbol ("type" : "esriPMS"). The symbol has the following properties:

{
   "type": "esriPMS",
   "url" : "https://static.arcgis.com/images/Symbols/SafetyHealth/FireStation.png",
   "height": 6,
   "angle": -30,
   "xoffset": 0,
   "yoffset": 0
}

© 2019 Latitude Geographics Group Ltd. All Rights Reserved.

Documentation Version 5.11