|
ArcGIS Runtime SDK for iOS
100.9
|
A layer that can visualize annotation text data. Annotation can be used to symbolize text on your maps as described in the Annotation ArcGIS Pro documentation. Annotation is defined by a text string, geographical location, and display properties including font, size, and color. These are stored together in an annotation feature class within a geodatabase. There are two kinds of annotation:
AGSMapView. If the feature-linked annotation is stored in an Enterprise server, its feature and annotation tables must contain global object ids.You can construct an annotation layer in the following ways:
AGSServiceFeatureTable that has a feature layer service type of AGSArcGISFeatureLayerInfoServiceType::annotationLayer. AGSGeodatabaseFeatureTable returned by the AGSGeodatabase::geodatabaseAnnotationTables array when a AGSGenerateGeodatabaseJob has completed. The feature service must be hosted on ArcGIS Enterprise 10.7.1 or later. Annotation respects the reference scale defined by the map, so annotation will always be presented to the user at the correct size and position, as defined by the annotation author.
Each annotation layer is partitioned into annotation sublayers. Each annotation sublayer corresponds to the label class of the original labels that were used to publish the annotation. In ArcGIS Pro, the annotation sublayers are known as annotation classes.
Annotation sublayers offer greater control over the annotation:
AGSLayer, Sample: Display annotation, Sample: Control annotation sublayer visibility
Instance Methods | |
| (void) | - cancelLoad |
| (id< AGSCancelable >) | - fetchLegendInfosWithCompletion: |
| (instancetype) | - initWithFeatureTable: |
| (instancetype) | - initWithItem:serviceLayerID: |
| (instancetype) | - initWithURL: |
| (BOOL) | - isEqualToLayer: |
| (BOOL) | - isVisibleAtScale: |
| (void) | - loadWithCompletion: |
| (void) | - retryLoadWithCompletion: |
Class Methods | |
| (instancetype) | + annotationLayerWithFeatureTable: |
| (instancetype) | + annotationLayerWithItem:serviceLayerID: |
| (instancetype) | + annotationLayerWithURL: |
Properties | |
| NSString * | attribution |
| BOOL | canChangeVisibility |
| AGSCredential * | credential |
| AGSArcGISFeatureTable * | featureTable |
| AGSEnvelope * | fullExtent |
| BOOL | identifyEnabled |
| AGSItem * | item |
| NSString * | layerDescription |
| NSString * | layerID |
| NSError * | loadError |
| AGSLoadStatus | loadStatus |
| double | maxScale |
| double | minScale |
| NSString * | name |
| float | opacity |
| double | referenceScale |
| AGSRequestConfiguration * | requestConfiguration |
| NSInteger | serviceLayerID |
| BOOL | showInLegend |
| AGSSpatialReference * | spatialReference |
| NSArray< id< AGSLayerContent > > * | subLayerContents |
| void(^ | subLayerContentsChangedHandler )(void) |
| NSURL * | URL |
| BOOL | visible |
| + (instancetype) annotationLayerWithFeatureTable: | (AGSArcGISFeatureTable *) | featureTable |
Creates an annotation layer from a feature table containing annotation features. If the feature table does not contain annotation data then the AGSAnnotationLayer will fail to load. AGSArcGISFeatureTable::layerInfo and AGSArcGISFeatureLayerInfo::serviceType can be checked, to verify the feature type, before attempting to create an AGSLayer.
| featureTable | The feature table, containing annotation features, used as the source of the annotation layer. |
AGSArcGISFeatureTable | + (instancetype) annotationLayerWithItem: | (AGSItem *) | item | |
| serviceLayerID: | (NSInteger) | serviceLayerID | |
Creates a new annotation layer from a feature service portal item.
| item | A feature service AGSPortalItem. |
| serviceLayerID | The ID of the layer in the service for which to create the annotation layer. |
AGSLayer::item | + (instancetype) annotationLayerWithURL: | (NSURL *) | URL |
Creates a new annotation layer from a feature service URL. If the specified URL is not a valid Feature Service endpoint, then it will fail to load.
| URL | The URL to the feature service layer. |
|
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>) fetchLegendInfosWithCompletion: | (void(^)(NSArray< AGSLegendInfo * > *__nullable legendInfos, NSError *__nullable error)) | completion |
Fetches the array of legend infos (AGSLegendInfo) for this layer.
| - (instancetype) initWithFeatureTable: | (AGSArcGISFeatureTable *) | featureTable |
Creates an annotation layer from a feature table containing annotation features. If the feature table does not contain annotation data then the AGSAnnotationLayer will fail to load. AGSArcGISFeatureTable::layerInfo and AGSArcGISFeatureLayerInfo::serviceType can be checked, to verify the feature type, before attempting to create an AGSLayer.
| featureTable | The feature table, containing annotation features, used as the source of the annotation layer. |
AGSArcGISFeatureTable | - (instancetype) initWithItem: | (AGSItem *) | item | |
| serviceLayerID: | (NSInteger) | serviceLayerID | |
Creates a new annotation layer from a feature service portal item.
| item | A feature service AGSPortalItem. |
| serviceLayerID | The ID of the layer in the service for which to create the annotation layer. |
AGSLayer::item | - (instancetype) initWithURL: | (NSURL *) | URL |
Creates a new annotation layer from a feature service URL. If the specified URL is not a valid Feature Service endpoint, then it will fail to load.
| URL | The URL to the feature service layer. |
| - (BOOL) isEqualToLayer: | (AGSLayer *) | other |
| - (BOOL) isVisibleAtScale: | (double) | scale |
Check whether this layer is visible at a given scale.
|
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. |
|
readnonatomiccopyinherited |
Attribution information of the layer
|
readrequirednonatomicassigninherited |
Denotes whether the layer can change visibility or not.
|
readwritenonatomicstronginherited |
Security credentials to access the remote resource. Only applicable if the resource is secured.
|
readnonatomicstrong |
The feature table associated with this layer.
|
readnonatomicstronginherited |
Full extent of the layer.
|
readnonatomicassigninherited |
Specifies whether the layer supports identify.
|
readnonatomicstronginherited |
The item the layer has been created from.
|
readwritenonatomiccopyinherited |
The layer's description
|
readwritenonatomiccopyinherited |
The layer's ID specified in the web map item of ArcGIS Online or an on-premises portal.
|
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.
|
readwritenonatomicassigninherited |
The maximum scale at which this layer is visible. If the map or scene is zoomed in beyond this scale, the layer will not be visible. A value of 0 means there is no maximum scale threshold and the layer will be visible at the smallest scale available for the map or scene.
|
readwritenonatomicassigninherited |
The minimum scale at which this layer is visible. If the map or scene is zoomed out beyond this scale, the layer will not be visible. A value of 0 means there is no minimum scale threshold and the layer will be visible at the largest scale available for the map or scene.
|
readwritenonatomiccopyinherited |
The name of the layer
|
readwritenonatomicassigninherited |
The opacity of this layer as a value between 0 (fully transparent) and 1 (fully opaque). Default value is 1.
|
readnonatomicassign |
The reference scale for the layer. The reference scale of the layer is the scale at which a client should view the layer for the text to appear at its authored size. If the client changes the viewing scale, then text will grow or shrink to keep a consistent size on the map (not the screen). For a valid layer, the reference scale will always be a finite value, greater than zero. Until the layer is loaded, the reference scale will be zero.
|
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.
|
readnonatomicassign |
The layer ID that defines the layer within the FeatureService Portal Item
|
readwritenonatomicassigninherited |
Indicates whether to show legend information.
|
readnonatomicstronginherited |
The spatial reference of the layer.
|
readnonatomiccopyinherited |
This layer's sub-layers.
|
readwritenonatomiccopyinherited |
Block that is invoked when the sub layer contents changes.
|
readrequirednonatomicstronginherited |
The URL of the remote resource.
|
readwritenonatomicassigninherited |
Denotes whether the layer is visible or not.