Skip To Content ArcGIS for Developers Sign In Dashboard

SymbolStyle QML Type

A mechanism to obtain symbols from a style (*.stylx) file. More...

Import Statement: import Esri.ArcGISRuntime 100.6
Since: Esri.ArcGISRuntime 100.0
Inherits:

Object

Inherited By:

DictionarySymbolStyle

Properties

Signals

Methods

Detailed Description

A style file is a gallery of symbols that are created and maintained with ArcGIS Pro. Style files are typically used to maintain a common set of symbols for use across your organization. Style files contain many layers of symbols, which can be grouped together to create new multi-layer symbols. A SymbolStyle is the class that ArcGIS Runtime uses to access a style file.

To use a SymbolStyle, construct a SymbolStyle by giving the full path to a style file, and search for symbols with searchSymbols. This will search the style file for symbols that match your input parameters. The results can then be used to create new graphics, renderers, symbol swatch images, or composite symbols.

Note: Style files used with SymbolStyle must be ArcGIS Runtime-enabled style files. The style files used in ArcGIS Pro and ArcMap cannot be directly consumed in ArcGIS Runtime. At the time of release of ArcGIS Runtime SDK 100.0, ArcGIS Runtime-enabled style files cannot be created by any released version of ArcGIS Pro. Once a version of Pro is released that can export these style files, this class can be used to consume them.

See also Loadable, Cancelable, SymbolStyleSearchParameters, and SymbolStyleSearchResult.

Property Documentation

autoLoad : bool

Determines if this SymbolStyle instance should attempt to automatically load after it has instantiated.

By default this property is true which means a SymbolStyle will attempt to load if it has at least a specificationType. It may be useful to declare this property as false in the case you would like to delay the loading of the SymbolStyle to be controlled manually at a later time.

This property cannot be set after the SymbolStyle has instantiated.


defaultSearchParametersResult : SymbolStyleSearchParameters

The result from the asynchronous defaultSearchParametersStatus method.

Obtain this result once the defaultSearchParametersStatusChanged emits, and the defaultSearchParametersStatus is completed.


defaultSearchParametersStatus : Enums.TaskStatus

Returns the status of the asynchronous defaultSearchParameters task (read-only).

See also Enums.TaskStatus.


fetchSymbolResult : Symbol

The result from the asynchronous fetchSymbol method(s).

Obtain this result once the fetchSymbolStatusChanged emits, and the fetchSymbolStatus is completed.


fetchSymbolStatus : Enums.TaskStatus

Returns the status of the asynchronous fetchSymbol task (read-only).

See also Enums.TaskStatus.


loadError : Error

Returns the load error (read-only).

Note: load errors are also reported on the error property and emit the errorChanged signal.

See also Loadable.


loadStatus : Enums.LoadStatus

Returns the load status code of this Loadable object (read-only).

See also Enums.LoadStatus and Loadable.


searchSymbolsResult : SymbolStyleSearchResultListModel

The results from the asynchronous searchSymbols method.

Obtain this result once the searchSymbolsStatusChanged emits, and the searchSymbolsStatus is completed.


searchSymbolsStatus : Enums.TaskStatus

Returns the status of the asynchronous searchSymbols task (read-only).

See also Enums.TaskStatus.


styleLocation : string

The path to the ArcGIS Runtime-enabled style (*.stylx) file.

This property must be set in order to construct a SymbolStyle.

You cannot change the styleLocation on the SymbolStyle after the instance is already loaded.


symbolStyleType : Enums.SymbolStyleType

Returns the type of Symbol Style for this object (read-only).

See also Enums.SymbolStyleType.


Signal Documentation

autoLoadChanged()

Emitted when the autoLoad property changes.


defaultSearchParametersStatusChanged()

Emitted when the defaultSearchParametersStatus property changes.


fetchSymbolStatusChanged()

Emitted when the fetchSymbolStatus property changes.


loadErrorChanged()

Emitted when the loadError property changes.

Note: load errors are also reported on the error property and emit the errorChanged signal.

See also Loadable and Object.


loadStatusChanged()

Emitted when the loadStatus property changes.

See also Loadable.


searchSymbolsStatusChanged()

Emitted when the searchSymbolsStatus property changes.


styleLocationChanged()

Emitted when the styleLocation property changes.


Method Documentation

void cancelLoad()

See also Loadable.


bool cancelTask(string taskId)

See also Cancelable.


string defaultSearchParameters()

Retrieves all of the valid SymbolStyleSearchParameters for the SymbolStyle.

This asynchronous task retrieves all the valid input search parameters in the style file. 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. The defaultSearchParametersStatusChanged signal emits once complete, with the defaultSearchParametersStatus being completed, giving access to pre-populated SymbolStyleSearchParameters.


string fetchSymbolWithKeyList(list<string> keys)

Gets a Symbol, as defined by the input keys.

This function is useful for obtaining a single, multi-layer symbol from the supplied keys. This is commonly used to create symbols and graphics on-the-fly. A common workflow for this would be to first call searchSymbols, which searches for symbols in the style file. This returns a list model of SymbolStyleSearchResults, all of which contain a key. Create a string list of all the keys you want in your resulting symbol, and call fetchSymbol with this string list. This will return a new symbol from all of the individual symbol keys provided.

The fetchSymbolStatusChanged signal emits once complete, giving access to the resulting symbol.

If the SymbolStyle is not loaded then starting this task will start the load cycle.

Note: The order of the keys in the string list determines how the output symbol will look. The first key in the string list will be at the bottom of the output symbol.


void load()

See also Loadable.


void retryLoad()

See also Loadable.


string searchSymbols(SymbolStyleSearchParameters searchParameters)

Searches for symbols using searchParameters.

This asynchronous task searches for symbols in a style file. The input searchParameters define what is searched for. For example, you could search for all symbols that have the tag "airspace" or "forestry". You can also set the match to be strict or not, which will determine if the search uses "=" or "LIKE" for each parameter. The searchSymbolsStatusChanged signal emits once complete, with the searchSymbolsStatus being completed, giving access to a SymbolStyleSearchResultListModel.

Note: To get all available style symbol search results, pass in a default constructed SymbolStyleSearchParameters.



Feedback on this topic?