Skip To Content ArcGIS for Developers Sign In Dashboard

DictionaryRenderer QML Type

A renderer that displays advanced military symbols obtained from a DictionarySymbolStyle. More...

Import Statement: import Esri.ArcGISRuntime 100.9
Since: Esri.ArcGISRuntime 100.0




Detailed Description

The DictionaryRenderer uses attributes from source data (such as fields of features in a feature table or attributes of graphics in a graphics overlay) to display unique multilayer symbols based on those attributes. This is achieved through an associated DictionarySymbolStyle.

The DictionarySymbolStyle is created using a given specification such as "mil2525d". Each specification depends on attribute names that define the symbology and text of each feature. For example, the mil2525d specification looks for attributes named "identity", "symbolset", "symbolentity", and "modifier1", among many others. These attributes reference different symbols in the style file that are assembled to create a unique symbol. In order to display features using the DictionaryRenderer, you must make sure the

DictionaryRenderer and associated DictionarySymbolStyle know which attributes in your data to use. This can be achieved in multiple ways:

  • Pre-author your data so that the attribute names match the attributes needed by the specification. In the case of the mil2525d specification, author a feature service (or other data source) with a field named "identity", another named "symbolset", and so on. In this scenario, you create a FeatureTable from the source data, create a FeatureLayer from the FeatureTable, apply the DictionaryRenderer to the FeatureLayer, and the symbols are generated automatically and applied to the layer in the map. The same workflow applies for Graphics in a GraphicsOverlay. Ideally when creating graphics on the fly, you can give the attributes names that match the specification. When fields in the FeatureTable and attributes in Graphics have expected names, the DictionaryRenderer automatically finds them.
  • Manually map your attribute names to those expected by the specification. You can map as many attribute names as necessary for the specification, but only need to map attribute names that do not match the specification (all matching attribute names will be automatically matched by the renderer). For example, an expected attribute "symbolset" might appear as the "symbol_set" field in your FeatureTable. In this scenario, you can create a ServiceFeatureTable from a feature service, create a FeatureLayer from that feature table, create a DictionaryRenderer by manually mapping the "symbol_set" name to the "symbolset" name expected by the specification, and finally apply the renderer to the FeatureLayer.

A DictionaryRenderer can be applied to pre-authored data, such as feature services, mobile geodatabases (generated from ArcMap or a sync-enabled feature service), and feature layers in a mobile map package. You can also apply it to a GraphicsOverlay, which allow for on-the-fly graphic generation.

Note: For mil2525d, symbolset, entity, and identity fields are required to create a symbol. This information, along with the range of valid inputs can be found on the Military Features Data GitHub page.


Apply a DictionaryRenderer to a FeatureLayer:

// Create a layer and set the feature table
const layer = ArcGISRuntimeEnvironment.createObject("FeatureLayer");
layer.featureTable = tables[i];

// Create a dictionary renderer and apply to the layer
const renderer = ArcGISRuntimeEnvironment.createObject("DictionaryRenderer",{
                                                           Factory.DictionarySymbolStyle.createFromFile(dataPath + "/styles/arcade_style/mil2525d.stylx")
layer.renderer = renderer;

Note: For details on the currently support military standards, please see the DictionarySymbolStyle API reference.

Property Documentation

dictionarySymbolStyle : DictionarySymbolStyle

The the DictionarySymbolStyle to be applied by the DictionaryRenderer.

This is a required property that must be set in order to use a DictionaryRenderer.

symbologyFieldOverrides : jsobject

Key/value pairs for mapping symbology fields to the specification's expected fields.

A DictionarySymbolStyle uses a collection of expected attribute names to build a symbol based on input values. When initialized, fields in the input dataset are mapped to the expected attribute names using case-insensitive matching. In cases where your source data's field names do not match the DictionarySymbolStyle specification, the proper constructor must be used to map your field names to the specification's. The the key is the specification attribute name (e.g. "symbolset"), and the value is your attribute name (e.g. "symbol_set"). You can also exclude an expected field by providing an empty string for it in the overrides.

To obtain the valid symbology fields in a symbol dictionary, use DictionarySymbolStyle::symbologyFieldNames.

textFieldOverrides : jsobject

Key/value pairs for mapping text fields to the specification's expected fields.

In the case where your source data's field names do not match what the DictionarySymbolStyle specification expects, this property must be used to map your field names to the specification's, where the key is the specification name (e.g. "staffcomment"), and the value is your field's name (e.g. "staff_comment"). To obtain the valid text fields in a symbol dictionary, use DictionarySymbolStyle::textFieldNames.

Signal Documentation


Emitted when the dictionarySymbolStyle property changes.

Note: The corresponding handler is onDictionarySymbolStyleChanged.


Emitted when the symbologyFieldOverrides property changes.

Note: The corresponding handler is onSymbologyFieldOverridesChanged.


Emitted when the textFieldOverrides property changes.

Note: The corresponding handler is onTextFieldOverridesChanged.

Feedback on this topic?