|
ArcGIS Runtime SDK for iOS
100.9
|
A dictionary symbol style object containing symbol primitives and rules for generating symbols from attribute values.
An AGSDictionarySymbolStyle is created from a style file on disk (an SQLite database with a .stylx extension, created with ArcGIS Pro).
An AGSDictionarySymbolStyle must contain a set of symbol primitives and a rule engine that parses input fields. The AGSDictionarySymbolStyle assembles new symbols based on the input attribute values. AGSDictionarySymbolStyle is often used to render symbols from a military specification (such as Mil2525D or App6B) but can also be used with a custom style.
An AGSDictionarySymbolStyle is used in conjunction with an AGSDictionaryRenderer to symbolize geoelements in a AGSFeatureLayer or AGSGraphicsOverlay.
AGSDictionaryRenderer
Instance Methods | |
| (void) | - cancelLoad |
| (id< AGSCancelable >) | - defaultSearchParametersWithCompletion: |
| (instancetype) | - initWithFileURL: |
| (instancetype) | - initWithName: |
| (instancetype) | - initWithSpecificationType: |
| (instancetype) | - initWithSpecificationType:styleURL: |
| (instancetype) | - initWithURL: |
| (void) | - loadWithCompletion: |
| (void) | - retryLoadWithCompletion: |
| (id< AGSCancelable >) | - searchSymbolsWithParameters:completion: |
| (id< AGSCancelable >) | - symbolForKeys:completion: |
| (id< AGSCancelable >) | - symbolWithAttributes:completion: |
Class Methods | |
| (instancetype) | + dictionarySymbolStyleWithFileURL: |
| (instancetype) | + dictionarySymbolStyleWithName: |
| (instancetype) | + dictionarySymbolStyleWithSpecificationType: |
| (instancetype) | + dictionarySymbolStyleWithSpecificationType:styleURL: |
| (instancetype) | + symbolStyleWithName: |
| (instancetype) | + symbolStyleWithURL: |
Properties | |
| NSDictionary< NSString *, NSString * > * | configurationProperties |
| NSArray< AGSDictionarySymbolStyleConfiguration * > * | configurations |
| AGSCredential * | credential |
| NSString * | dictionaryName |
| NSError * | loadError |
| AGSLoadStatus | loadStatus |
| AGSRequestConfiguration * | requestConfiguration |
| NSString * | specificationType |
| NSArray< NSString * > * | symbologyFieldNames |
| NSArray< NSString * > * | textFieldNames |
| NSURL * | URL |
|
requiredinherited |
Cancels loading if it is in progress, otherwise it does nothing. This should be called carefully because other objects could be waiting for loadWithCompletion: or retryLoadWithCompletion: to complete and this will call them all back with the error of NSUserCancelledError
| - (id<AGSCancelable>) defaultSearchParametersWithCompletion: | (void(^)(AGSSymbolStyleSearchParameters *__nullable searchParams, NSError *__nullable error)) | completion |
A convenience method to get properly initialized search parameters for looking up symbols within the .stylx file. The parameters contain all of the possible input values for categories, keys, names, symbolClasses, and tags. This is an expensive task that should be used sparingly. Returns a AGSSymbolStyleSearchParameters 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.
| completion | Block that is invoked when the operation finishes. The searchParams parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
| + (instancetype) dictionarySymbolStyleWithFileURL: | (NSURL *) | fileURL |
Creates a new dictionary symbol style object from the style file at the provided location.
| fileURL | The physical location the .stylx file. |
| + (instancetype) dictionarySymbolStyleWithName: | (NSString *) | name |
Creates a new dictionary symbol style object from the name style file within the application bundle or shared documents directory.
| name | The name of the stylx file (excluding the .stylx file extension). |
| + (instancetype) dictionarySymbolStyleWithSpecificationType: | (NSString *) | specificationType |
Creates a new dictionary symbol style object for a known military standard (such as Mil2525D). This constructor is only valid for use with the older format style files. An AGSErrorCodeCommonInvalidArgument is raised if a newer format (Arcade-based) style is encountered.
| specificationType | The name of supported military standard to use for the dictionary style. |
AGSDictionarySymbolStyle from a specification is no longer supported with the new Arcade-based symbol styles. Provided by category AGSDictionarySymbolStyle(AGSDeprecated).
| + (instancetype) dictionarySymbolStyleWithSpecificationType: | (NSString *) | specificationType | |
| styleURL: | (NSURL *) | styleURL | |
Creates a new Symbol dictionary object using the style file identified by the specification type or style location. This constructor is only valid for use with the older format style files. An AGSErrorCodeCommonInvalidArgument is raised if a newer format (Arcade-based) style is encountered.
| specificationType | The name of a supported military standard to use for the dictionary style. |
| styleURL | The physical location of an older format (non-Arcade based) .stylx file. You must provide the full path (e.g. ../../../mil2525c/mil2525c.stylx). |
AGSDictionarySymbolStyle from a specification is no longer supported with the new military symbol styles. Provided by category AGSDictionarySymbolStyle(AGSDeprecated).
| - (instancetype) initWithFileURL: | (NSURL *) | fileURL |
Creates a new dictionary symbol style object from the style file at the provided location.
| fileURL | The physical location the .stylx file. |
| - (instancetype) initWithName: | (NSString *) | name |
Creates a new dictionary symbol style object from the name style file within the application bundle or shared documents directory.
| name | The name of the stylx file (excluding the .stylx file extension). |
Implements AGSSymbolStyle.
| - (instancetype) initWithSpecificationType: | (NSString *) | specificationType |
Creates a new dictionary symbol style object for a known military standard (such as Mil2525D). This constructor is only valid for use with the older format style files. An AGSErrorCodeCommonInvalidArgument is raised if a newer format (Arcade-based) style is encountered.
| specificationType | The name of supported military standard to use for the dictionary style. |
AGSDictionarySymbolStyle from a specification is no longer supported with the new Arcade-based symbol styles. Provided by category AGSDictionarySymbolStyle(AGSDeprecated).
| - (instancetype) initWithSpecificationType: | (NSString *) | specificationType | |
| styleURL: | (NSURL *) | styleURL | |
Creates a new Symbol dictionary object using the style file identified by the specification type or style location. This constructor is only valid for use with the older format style files. An AGSErrorCodeCommonInvalidArgument is raised if a newer format (Arcade-based) style is encountered.
| specificationType | The name of a supported military standard to use for the dictionary style. |
| styleURL | The physical location of an older format (non-Arcade based) .stylx file. You must provide the full path (e.g. ../../../mil2525c/mil2525c.stylx). |
AGSDictionarySymbolStyle from a specification is no longer supported with the new military symbol styles. Provided by category AGSDictionarySymbolStyle(AGSDeprecated).
| - (instancetype) initWithURL: | (NSURL *) | fileURL |
Initialize a symbol style with the specified .stylx file
| fileURL | to a .stylx file on disk |
|
requiredinherited |
Loads data for the object asynchronously. The completion block is invoked upon completion.
You can call this method any number of times, however only one attempt is made to load the data. If it is already loading, it will just continue to load (i.e. not force a reload). If it has already loaded successfully, the completion block will be invoked right away. If it has already failed to load, the completion block will be invoked right away with error previously encountered. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.
| completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
- cancelLoad to cancel loading - retryLoadWithCompletion: to force reload
|
requiredinherited |
Tries to reload when an object has failed to load. This method should be called judiciously. It should be called when:
cancelLoad and then this methodIf the data hasn't started loading, it will start loading. If it is already loading, it will just continue to load. If it has already loaded successfully, calls back right away. If it has already failed to load, tries again. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.
| completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
| - (id<AGSCancelable>) searchSymbolsWithParameters: | (AGSSymbolStyleSearchParameters *) | searchParameters | |
| completion: | (void(^)(NSArray< AGSSymbolStyleSearchResult * > *__nullable searchResults, NSError *__nullable error)) | completion | |
Returns an array of AGSSymbolStyleSearchResult objects.
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.
| searchParameters | an object of type AGSSymbolStyleSearchParameters. |
| completion | Block that is invoked when the operation finishes. The searchResults parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
| - (id<AGSCancelable>) symbolForKeys: | (NSArray< NSString * > *) | keys | |
| completion: | (void(^)(AGSSymbol *__nullable symbol, NSError *__nullable error)) | completion | |
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.
| keys | NSArray of strings. It is the list of keys required to obtain a symbol from the style. |
| completion | block that is invoked with the result |
| + (instancetype) symbolStyleWithName: | (NSString *) | name |
Initialize a symbol style with the name of a .stylx file that is within the application bundle or shared documents directory.
| name | of the .stylx file (without the file extension) within the application bundle or shared documents directory. |
| + (instancetype) symbolStyleWithURL: | (NSURL *) | fileURL |
Initialize a symbol style with the specified .stylx file
| fileURL | to a .stylx file on disk |
| - (id<AGSCancelable>) symbolWithAttributes: | (NSDictionary< NSString *, id > *) | attributes | |
| completion: | (void(^)(AGSSymbol *__nullable symbol, NSError *__nullable error)) | completion | |
Creates a symbol based on the provided attributes. 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 graphic or renderer, obtain its swatch image, or serialize to JSON.
| attributes | used to create the symbol |
| completion | block that is invoked when the operation completes. The symbol is populated if the operation succeeds, else the error is populated if the operation fails. |
|
readwritenonatomiccopy |
The NSDictionary of configuration settings and values used by the style. These settings are specific to the rule engine used by the AGSDictionarySymbolStyle.
Provided by category AGSDictionarySymbolStyle(AGSDeprecated).
|
readnonatomiccopy |
The collection of configuration settings for the custom dictionary style.
|
readwritenonatomicstronginherited |
Security credentials to access the remote resource. Only applicable if the resource is secured.
|
readnonatomiccopy |
The name of the custom Arcade-based dictionary style. For older version style files, this is an empty string.
|
readnonatomicstronginherited |
The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.
|
readrequirednonatomicassigninherited |
Status of the load operation.
|
readwritenonatomicstronginherited |
The AGSRequestConfiguration object which defines the behavior and policies to use when accessing the remote resource. The default will be nil. If it is nil the [AGSRequestConfiguration globalConfiguration] will be used.
|
readnonatomiccopy |
The name of the dictionary (.stylx file), such as "Mil2525D".
AGSDictionarySymbolStyle::dictionaryName property instead. Provided by category AGSDictionarySymbolStyle(AGSDeprecated).
|
readnonatomiccopy |
The string list of attributes used to construct a symbol from the AGSDictionarySymbolStyle. 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.
|
readnonatomiccopy |
The string list of attributes used to obtain text values for display with a symbol from the AGSDictionarySymbolStyle. 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.
|
readrequirednonatomicstronginherited |
The URL of the remote resource.