A mechanism to obtain symbols from a style (*.stylx) file. More...
|Import Statement:||import Esri.ArcGISRuntime 100.6|
- autoLoad : bool
- defaultSearchParametersResult : SymbolStyleSearchParameters
- defaultSearchParametersStatus : Enums.TaskStatus
- fetchSymbolResult : Symbol
- fetchSymbolStatus : Enums.TaskStatus
- loadError : Error
- loadStatus : Enums.LoadStatus
- searchSymbolsResult : SymbolStyleSearchResultListModel
- searchSymbolsStatus : Enums.TaskStatus
- styleLocation : string
- symbolStyleType : Enums.SymbolStyleType
- void cancelLoad()
- bool cancelTask(string taskId)
- string defaultSearchParameters()
- string fetchSymbolWithKeyList(list<string> keys)
- void load()
- void retryLoad()
- string searchSymbols(SymbolStyleSearchParameters searchParameters)
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.
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
fetchSymbolResult : Symbol
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
See also Loadable.
searchSymbolsResult : SymbolStyleSearchResultListModel
Returns the type of Symbol Style for this object (read-only).
See also Enums.SymbolStyleType.
Emitted when the autoLoad property changes.
Emitted when the defaultSearchParametersStatus property changes.
Emitted when the fetchSymbolStatus property changes.
Emitted when the searchSymbolsStatus property changes.
Emitted when the styleLocation property changes.
See also Cancelable.
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.
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.
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.