ArcGIS Developers
Dashboard

SymbolStyle QML Type

A symbol style object. More...

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

Object

Inherited By:

DictionarySymbolStyle

Properties

Signals

Methods

Detailed Description

A SymbolStyle is created from a style file located on disk (an SQLite database with a .stylx extension, created with ArcGIS Pro), a style file hosted on ArcGIS Online, or a web style accessed from an ArcGIS Enterprise portal.

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. Because each symbol in the style has a key that uniquely identifies it, you can pass an list of keys into fetchSymbolWithKeyList(list<string>) 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 searchSymbols(SymbolStyleSearchParameters). You could create a symbol picker app, for example, that searches for all symbols in the style that have the tag "maritime". The search results contain symbols that you could use directly. You could also extract their individual symbol components to create a new multilayer symbol.

See also Loadable and DictionarySymbolStyle.

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.


portal : Portal

The portal that hosts the web style identified with styleName. This will be null if the style was identified with a PortalItem, a URL, or a local .stylx file on disk.

This property was introduced in Esri.ArcGISRuntime 100.10.


portalItem : PortalItem

The portal item representing the web style.

The PortalItem will be set when SymbolStyle is created using createSymbolStyleFromUrl(url).

This property was introduced in Esri.ArcGISRuntime 100.10.


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.


styleName : string

The name of the web style.

The registered Esri symbol style name. The styleName cannot be a custom web style name. This will be empty if the style was identified with a URL, a PortalItem, or a local .stylx file on disk.

This property was introduced in Esri.ArcGISRuntime 100.10.


symbolStyleType : Enums.SymbolStyleType

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

See also Enums.SymbolStyleType.


url : url

The URL of the web style. This will be empty if the style was identified with a PortalItem, a style name, or a local .stylx file on disk.

This property was introduced in Esri.ArcGISRuntime 100.10.


Signal Documentation

autoLoadChanged()

Emitted when the autoLoad property changes.

Note: The corresponding handler is onAutoLoadChanged.


defaultSearchParametersStatusChanged()

Emitted when the defaultSearchParametersStatus property changes.

Note: The corresponding handler is onDefaultSearchParametersStatusChanged.


fetchSymbolStatusChanged()

Emitted when the fetchSymbolStatus property changes.

Note: The corresponding handler is onFetchSymbolStatusChanged.


loadErrorChanged()

Emitted when the loadError property changes.

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

Note: The corresponding handler is onLoadErrorChanged.

See also Loadable and Object.


loadStatusChanged()

Emitted when the loadStatus property changes.

Note: The corresponding handler is onLoadStatusChanged.

See also Loadable.


void portalChanged()

Emitted when the portal property changes.

Note: The corresponding handler is onPortalChanged.

This signal was introduced in Esri.ArcGISRuntime 100.10.


void portalItemChanged()

Emitted when the portalItem property changes.

Note: The corresponding handler is onPortalItemChanged.

This signal was introduced in Esri.ArcGISRuntime 100.10.


searchSymbolsStatusChanged()

Emitted when the searchSymbolsStatus property changes.

Note: The corresponding handler is onSearchSymbolsStatusChanged.


styleLocationChanged()

Emitted when the styleLocation property changes.

Note: The corresponding handler is onStyleLocationChanged.


void styleNameChanged()

Emitted when the styleName property changes.

Note: The corresponding handler is onStyleNameChanged.

This signal was introduced in Esri.ArcGISRuntime 100.10.


void urlChanged()

Emitted when the url property changes.

Note: The corresponding handler is onUrlChanged.

This signal was introduced in Esri.ArcGISRuntime 100.10.


Method Documentation

void cancelLoad()

See also Loadable.


bool cancelTask(string taskId)

Cancel the task with the ID taskId.

Returns false if the task cannot be cancelled or there is no task with the specified id taskId.

See also Cancelable.


SymbolStyle createSymbolStyleFromUrl(url webStyleUrl)

Creates a new symbol style object using web style item Url.

  • webStyleUrl

This method can only be accessed via the Factory object.

Factory.SymbolStyle.createSymbolStyleFromUrl(...)

A symbol style using style item's URL. For example, https://www.arcgis.com/home/item.html?id=bf27400d167d4c2e8e12c8a46f87afe4 is the URL of the "Basic Shapes" style on ArcGIS Online.".

This method was introduced in Esri.ArcGISRuntime 100.10.


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?