Dictionary Symbol Style
A dictionary symbol style object containing symbol primitives and rules for generating symbols from attribute values. A DictionarySymbolStyle is created either from a style file on disk (an SQLite database with a .stylx extension, created with ArcGIS Pro) or from a dictionary style file hosted on ArcGIS Online or an ArcGIS Enterprise portal (also referred to as a dictionary web style)
A DictionarySymbolStyle must contain a set of symbol primitives and a rule engine that parses input fields. The DictionarySymbolStyle assembles new symbols based on the input attribute values. DictionarySymbolStyle is often used to render symbols from a military specification (such as Mil2525D or App6B) but can also be used with a custom style.
A DictionarySymbolStyle is used in conjunction with a DictionaryRenderer to symbolize geoelements in a com.arcgismaps.mapping.layers.FeatureLayer or com.arcgismaps.mapping.view.GraphicsOverlay.
Esri builds and maintains some dictionary web styles according to the US and NATO military symbol specifications. These desktop and web styles are hosted online and are publicly available. Refer to the ArcGIS Online Dictionary Symbology Styles group for the latest versions of the styles available.
Since
200.1.0
See also
Constructors
Creates a new dictionary symbol style object from a portal item. The portal item must contain a dictionary style. If you have the item id of a style file, you can search the portal to find the item using its item id. Use this constructor if you have a reference to a portal item.
Properties
The collection of configuration settings for the custom dictionary style.
The name of the custom Arcade-based dictionary style. For older version style files, this is an empty string.
The string list of attributes used to construct a symbol from the DictionarySymbolStyle. For example, mil2525d would include "identity", "symbolset", "symbolentity", and "modifier1", among many others. The newer Arcade-based styles define such attributes within the .stylx file as a JSON string.
The string list of attributes used to obtain text values for display with a symbol from a DictionarySymbolStyle. For example, mil2525d would include "combateffectiveness", "credibility", "reliability", and "staffcomment", among many others. The newer Arcade-based styles define such attributes within the .stylx file as a JSON string.
Inherited properties
The load status.
The portal that hosts the web style identified with SymbolStyle.styleName. This will be null if the style was identified with a PortalItem or Uri or a local .stylx file on disk.
The portal item representing the web style. The PortalItem will be set when SymbolStyle is created using SymbolStyle.SymbolStyle or SymbolStyle.createWithUrl. This will be null if the style was created using SymbolStyle.SymbolStyle or is identified with a local .stylx file on disk.
The location of the .stylx file on disk. This will be empty if the style was hosted on a portal (also referred to as a web style).
Functions
Asynchronously returns a symbol based on the provided attributes. This function is useful for obtaining a single, multi-layer symbol from supplied attributes. This is commonly used to create symbols and graphics on-the-fly. For example, with mil2525d, you may want to obtain a symbol where "symbolset" is 40, "modifier1" is "Incident Qualifier : Accident", "echelon" is "Army", and so on. All of these key/value pairs can be used to obtain the specific symbol that you need. Once you have that symbol, you can apply it to a com.arcgismaps.mapping.view.Graphic or Renderer, obtain its swatch image, or serialize to JSON. If the DictionarySymbolStyle is not loaded then initiating this task will start the load cycle.
Inherited functions
Cancels loading metadata for the Loadable object.
Returns a Symbol Style Search Parameters object providing all available search parameters from the database. This asynchronous task retrieves all the valid input search parameters for a style. This means you get all of the possible input values for categories, keys, names, symbolClasses, and tags. This is an expensive task that should be used sparingly.
Asynchronously returns a symbol based on the provided list of keys. This function is useful for obtaining a single, multi-layer symbol from supplied keys. This is commonly used to create symbols and graphics on-the-fly. For example, assume XYZ style has a symbol with key "abc" which is the central symbol and another symbol with key "pqr", which could be the modifier/echelon placed at some offset from central geometry. So if you provide these two keys as attributes then symbol style will find and assemble a symbol accordingly. Once you have that symbol, you can apply it to a Graphic or Renderer, obtain its swatch image, or serialize to JSON. If the Symbol style is not loaded then starting this task will start the load cycle.
Returns a collection of Symbol Style Search Result object. This asynchronous task searches for symbol primitives in the symbol style. The input searchParameters define what is searched for. For example, you could search for all symbols that have the tag "airspace". You can also set the match to be strict or not, which will determine if the search uses "=" or "LIKE" for each parameter.