Symbol Style
A symbol style object. A SymbolStyle is created either from a style file on disk (an SQLite database with a .stylx extension, created with ArcGIS Pro) or from a style file hosted on ArcGIS Online or an ArcGIS Enterprise portal (also referred to as a web style).
When used by itself, the symbol style supports two key workflows. One is to return a symbol based on a provided set of key values. Since each symbol in the style has a key that uniquely identifies it, you can pass an array of keys into SymbolStyle.getSymbol(MutableListImpl) to return a new Symbol built from the individual symbols represented by those keys. You might use this symbol to create a new Graphic.
The other common workflow is to use a standalone symbol style to search for symbol primitives. Symbol primitives are the individual symbols that compose more complex symbols. This is achieved using SymbolStyle.searchSymbols(SymbolStyleSearchParameters). You could create a symbol picker app, for example, that searches for all symbols in the style that have the tag "maritime" in it. The search results contain symbols that you could use directly. You could also extract their individual symbol components to create a new multilayer symbol.
Since
200.1.0
See also
Inheritors
Properties
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(PortalItem) or SymbolStyle.createWithUrl(String). This will be null if the style was created using SymbolStyle.SymbolStyle(String, Portal) 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
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.