ArcGIS Runtime SDK for iOS
100.15
|
A layer that can visualize dimension features data.
Dimension features are a special kind of annotation feature for showing specific lengths or distances on a map. A dimension may indicate the length of a side of a building or land parcel, or the distance between two features, such as a fire hydrant and the corner of a building. They are described in detail in "Dimension".
Each dimension feature has specific text and specific locations for its schematic lines and arrows.
Dimension features are not linked to other point, line, or polygon features, even if the dimension measurement was created to refer to one or more features.
You can construct a dimension layer using a feature table containing dimension features:
AGSServiceFeatureTable
that has a feature layer service type of AGSArcGISFeatureLayerInfoServiceTypeDimensionLayer
. AGSGeodatabaseFeatureTable
returned by the AGSGeodatabase::geodatabaseDimensionTables
array when an AGSGenerateGeodatabaseJob
has completed.Dimension layers can be taken offline from a feature service hosted on ArcGIS Enterprise 10.9 or later, using the AGSGeodatabaseSyncTask
. Dimension layers are also supported in mobile map packages or mobile geodatabases created in ArcGIS Pro 2.9 or later.
Dimension respects the reference scale defined by the map, so dimension will always be presented to the user at the correct size and position, as defined by the dimension author.
Dimension features cannot be added, changed, or deleted by Runtime users (attempts will produce a "Geodatabase table not editable" (3016) error).
The fields of a dimension feature can be queried by Runtime users or used in the definition expression, but not have their values changed. The automatic fields are described in detail in "Dimension fields". Authors may have added additional fields relevant to their data description.
The Runtime user does not have access to, and cannot change, the renderer or the styles used for rendering dimensions.
AGSLayer
Instance Methods | |
(void) | - cancelLoad |
(void) | - clearSelection |
(void) | - doCancelLoading |
(void) | - doStartLoading: |
(id< AGSCancelable >) | - fetchLegendInfosWithCompletion: |
(instancetype) | - initWithFeatureTable: |
(instancetype) | - initWithItem:serviceLayerID: |
(instancetype) | - initWithURL: |
(BOOL) | - isEqualToLayer: |
(BOOL) | - isVisibleAtScale: |
(void) | - loadDidFinishWithError: |
(void) | - loadWithCompletion: |
(void) | - onLoadStatusChanged |
(void) | - resetFeaturesVisible |
(void) | - retryLoadWithCompletion: |
(id< AGSCancelable >) | - selectedFeaturesWithCompletion: |
(void) | - selectFeature: |
(void) | - selectFeatures: |
(id< AGSCancelable >) | - selectFeaturesWithParameters:mode:completion: |
(void) | - setFeaturesVisibleWithFeatures:visible: |
(void) | - setFeatureVisibleWithFeature:visible: |
(void) | - unselectFeature: |
(void) | - unselectFeatures: |
Class Methods | |
(instancetype) | + dimensionLayerWithFeatureTable: |
(instancetype) | + dimensionLayerWithItem:serviceLayerID: |
(instancetype) | + dimensionLayerWithURL: |
Properties | |
NSString * | attribution |
AGSLabelBarrierWeight | barrierWeight |
BOOL | canChangeVisibility |
AGSCredential * | credential |
NSString * | definitionExpression |
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 |
|
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
- (void) clearSelection |
Updates any selected features in the layer back to the un-selected state.
+ (instancetype) dimensionLayerWithFeatureTable: | (AGSArcGISFeatureTable *) | featureTable |
Creates a dimension layer object from a feature table containing dimension features.
If the feature table does not contain dimension data then the dimension layer will fail to load. AGSArcGISFeatureTable::layerInfo
and AGSArcGISFeatureLayerInfo::serviceType
can be checked, to verify the feature type, before attempting to create a layer.
featureTable | The feature table, containing dimension features, used as the source of the dimension layer. |
AGSArcGISFeatureTable
+ (instancetype) dimensionLayerWithItem: | (AGSItem *) | item | |
serviceLayerID: | (NSInteger) | serviceLayerID | |
Creates a new dimension layer object from a feature service portal item.
item | A feature service item. |
serviceLayerID | The service layer ID for which to create the layer. |
AGSLayer::item
+ (instancetype) dimensionLayerWithURL: | (NSURL *) | URL |
Creates a new dimension 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. |
- (void) doCancelLoading |
Never call this method directly. The framework calls this method on a background thread when cancelLoad (AGSLoadable-p)
is called. It is meant to be overriden by subclasses. Subclasses should override this method to cancel loading their data and call loadDidFinishWithError: (AGSLoadableBase(ForSubclassEyesOnly))
at the end passing in an error representing NSUserCancelledError
.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (void) doStartLoading: | (BOOL) | retrying |
Never call this method directly. The framework calls this method on a background thread when loadWithCompletion: (AGSLoadable-p)
or retryLoadWithCompletion: (AGSLoadable-p)
is called. It is meant to be overriden by subclasses. Subclasses should override this method to load their data and call loadDidFinishWithError: (AGSLoadableBase(ForSubclassEyesOnly))
upon completion, passing in the error if any.
retrying | flag that is true if this method was called from retryLoadWithCompletion: (AGSLoadable-p) . |
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (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 a dimension layer object from a feature table containing dimension features.
If the feature table does not contain dimension data then the dimension layer will fail to load. AGSArcGISFeatureTable::layerInfo
and AGSArcGISFeatureLayerInfo::serviceType
can be checked, to verify the feature type, before attempting to create a layer.
featureTable | The feature table, containing dimension features, used as the source of the dimension layer. |
AGSArcGISFeatureTable
- (instancetype) initWithItem: | (AGSItem *) | item | |
serviceLayerID: | (NSInteger) | serviceLayerID | |
Creates a new dimension layer object from a feature service portal item.
item | A feature service item. |
serviceLayerID | The service layer ID for which to create the layer. |
AGSLayer::item
- (instancetype) initWithURL: | (NSURL *) | URL |
Creates a new dimension 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.
- (void) loadDidFinishWithError: | (nullable NSError *) | error |
Only subclasses should call this method in doStartLoading: (AGSLoadableBase(ForSubclassEyesOnly))
and doCancelLoading (AGSLoadableBase(ForSubclassEyesOnly))
when done loading or failed to load.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
|
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 - (void) onLoadStatusChanged |
Never call this method directly. The framework calls this method on a background thread when AGSLoadable::loadStatus
changes is called. Subclasses can optionally implement this to know when their loading status has changed.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (void) resetFeaturesVisible |
Resets the visibility of the layer's features back to the original visibility when loaded from the data source.
|
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>) selectedFeaturesWithCompletion: | (void(^)(AGSFeatureQueryResult *_Nullable result, NSError *_Nullable error)) | completion |
Returns a list of the currently selected features.
completion | A block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
- (void) selectFeature: | (AGSFeature *) | feature |
Selects the given feature and adds it to the current list of selected features.
feature | The feature. |
- (void) selectFeatures: | (NSArray< AGSFeature * > *) | features |
Selects the features in the list and adds them to the current list of selected features.
features | An array of AGSFeature objects. |
- (id<AGSCancelable>) selectFeaturesWithParameters: | (AGSQueryParameters *) | parameters | |
mode: | (AGSSelectionMode) | mode | |
completion: | (void(^)(AGSFeatureQueryResult *_Nullable result, NSError *_Nullable error)) | completion | |
Selects the features that match the criteria in the AGSQueryParameters
object and adds them to the current list of selected features.
parameters | The definition of the query to submit to the feature table. |
mode | Defines how the list of currently selected features will be updated with the features returned from the query. |
completion | A block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
- (void) setFeaturesVisibleWithFeatures: | (NSArray< AGSFeature * > *) | features | |
visible: | (BOOL) | visible | |
Sets the visibility of the given features.
features | An array of AGSFeature objects. |
visible | YES to show, otherwise NO to hide. |
- (void) setFeatureVisibleWithFeature: | (AGSFeature *) | feature | |
visible: | (BOOL) | visible | |
Sets the visibility of the given feature.
feature | The feature whose visibility should be set. |
visible | YES to show, otherwise NO to hide. |
- (void) unselectFeature: | (AGSFeature *) | feature |
Unselects the given feature and removes it from the current list of selected features.
feature | The feature that should be unselected. |
- (void) unselectFeatures: | (NSArray< AGSFeature * > *) | features |
Unselects the features in the given array and removes them from the array of selected features.
features | An array of AGSFeature objects. |
|
readnonatomiccopyinherited |
Attribution information of the layer.
|
readwritenonatomicassign |
The weight of dimension features when considered as barriers to labeling. The default is AGSLabelBarrierWeightHigh
.
|
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.
|
readwritenonatomiccopy |
An expression which is a SQL statement where clause to specify the subset of features to be displayed.
The definition expression string uses the SQL-92 where clause syntax (https://en.wikipedia.org/wiki/SQL-92). The default value is an empty string, which will allow all dimension features in the data source to be used by the AGSDimensionLayer
.
|
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 schematic lines and text to appear at its authored size.
If the client changes the viewing scale, then the schematic lines and 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 service layer ID that defines the layer within the feature service 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. The visibility changes can be monitored using Key-Value Observing (KVO).