Information about an individual layer or table in a dynamic ArcGIS Map Service.
AGSArcGISMapImageLayer
displays maps from an ArcGIS map server. Each layer in the underlying map service is represented by an AGSArcGISSublayer
. You can control the visibility and symbols of sublayers and filter data with layer definition expressions.
You can get this object from AGSArcGISMapImageLayer::mapImageSublayers
once the map image layer is loaded or you can get a collection of handles from another map image sublayer by using AGSArcGISSublayer::sublayers
. You can also create a new sublayer from initWithID: (AGSArcGISMapImageSublayer)
.
- See also
AGSArcGISSublayer
, AGSArcGISMapImageLayer::mapImageSublayers
, AGSArcGISSublayer::sublayers
, - initWithID: (AGSArcGISMapImageSublayer)
- Since
- 100
◆ ArcGISMapImageSublayerWithID:
+ (instancetype) ArcGISMapImageSublayerWithID: |
|
(NSInteger) |
ID |
|
Initialize this sublayer with an ID
- Parameters
-
ID | of the sublayer in the ArcGIS Map Service |
- Returns
- Initialized map image sublayer
- Since
- 100
◆ ArcGISMapImageSublayerWithID:source:
Initialize this sublayer with an ID and a source
- Note
- Only map services that support dynamic layers (
AGSArcGISMapServiceInfo::supportsDynamicLayers
) will be able to handle sublayers with sources
- Parameters
-
ID | of the sublayer |
source | defining the data for the sublayer |
- Returns
- Initialized map image sublayer
- Since
- 100.1
◆ cancelLoad
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
- Since
- 100
◆ doCancelLoading
◆ doStartLoading:
- (void) doStartLoading: |
|
(BOOL) |
retrying |
|
◆ fetchLegendInfosWithCompletion:
- (id<AGSCancelable>) fetchLegendInfosWithCompletion: |
|
(void(^)(NSArray< AGSLegendInfo * > *__nullable legendInfos, NSError *__nullable error)) |
completion |
|
Fetches the array of legend infos (AGSLegendInfo
) for this layer.
- Since
- 100
◆ initWithID:
- (instancetype) initWithID: |
|
(NSInteger) |
ID |
|
Initialize this sublayer with an ID
- Parameters
-
ID | of the sublayer in the ArcGIS Map Service |
- Returns
- Initialized map image sublayer
- Since
- 100
◆ initWithID:source:
Initialize this sublayer with an ID and a source
- Note
- Only map services that support dynamic layers (
AGSArcGISMapServiceInfo::supportsDynamicLayers
) will be able to handle sublayers with sources
- Parameters
-
ID | of the sublayer |
source | defining the data for the sublayer |
- Returns
- Initialized map image sublayer
- Since
- 100.1
◆ isVisibleAtScale:
- (BOOL) isVisibleAtScale: |
|
(double) |
scale |
|
Check whether this layer is visible at a given scale.
- Since
- 100
◆ loadDidFinishWithError:
- (void) loadDidFinishWithError: |
|
(nullable NSError *) |
error |
|
◆ loadWithCompletion:
- (void) loadWithCompletion: |
|
(nullable void(^)(NSError *__nullable error)) |
completion |
|
|
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.
- Parameters
-
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. |
- Note
- The completion block is always invoked on the main thread.
- Since
- 100
- See also
- cancelLoad
to cancel loading
-
- retryLoadWithCompletion:
to force reload
◆ onLoadStatusChanged
- (void) onLoadStatusChanged |
|
|
|
◆ retryLoadWithCompletion:
- (void) retryLoadWithCompletion: |
|
(nullable void(^)(NSError *__nullable error)) |
completion |
|
|
requiredinherited |
Tries to reload when an object has failed to load. This method should be called judiciously. It should be called when:
- you didn't have network connectivity earlier when it failed and you want to retry now that you have connectivity
- the server was down earlier when it failed and you want to retry
- the request is taking too long and you want to cancel it and retry, in which case you will first call
cancelLoad
and then this method
If 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.
- Parameters
-
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. |
- Note
- The completion block is always invoked on the main thread.
- Since
- 100
◆ canChangeVisibility
- (BOOL) canChangeVisibility |
|
readrequirednonatomicassigninherited |
Denotes whether the layer can change visibility or not.
- Since
- 100
◆ definitionExpression
- (NSString*) definitionExpression |
|
readwritenonatomiccopy |
◆ labelDefinitions
Defines how labels should be displayed.
- Since
- 100.1
◆ labelsEnabled
Specifies whether labels should be displayed for this sublayer.
- Since
- 100.1
◆ loadError
|
readnonatomicstronginherited |
The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.
- Since
- 100
◆ loadStatus
|
readrequirednonatomicassigninherited |
Status of the load operation.
- Since
- 100
◆ mapServiceSublayerInfo
|
readnonatomicstronginherited |
Information about the source this sublayer originates from.
- Since
- 100.1
◆ maxScale
The maximum scale at which this sublayer is visible. If the map is zoomed in beyond this scale, the sublayer will not be visible.
- Since
- 100
◆ minScale
The minimum scale at which this sublayer is visible. If the map is zoomed out beyond this scale, the sublayer will not be visible.
- Since
- 100
◆ name
The sublayer's name.
- Since
- 100.1
◆ opacity
The opacity of this sublayer as a value between 0 (fully transparent) and 1 (fully opaque).
- Since
- 100.1
◆ popupDefinition
|
readwritenonatomicstronginherited |
The AGSPopupDefinition
associated with the popup source. This property will be nil
if an error occurs or if the popup source is not associated with a popup definition.
- Since
- 100
◆ popupEnabled
|
readwriterequirednonatomicassigninherited |
Indicates whether popups are enabled on this source.
- Since
- 100
◆ renderer
The renderer specifying how the features should be symbolized
- Since
- 100.1
◆ scaleSymbols
Specifies whether the symbols for this sublayer are tied to a scale and should resized as the scale varies.
- Since
- 100.1
◆ showInLegend
|
readwritenonatomicassigninherited |
Indicates whether to show legend information.
- Since
- 100
◆ source
The source of the data for this sublayer. Only applicable if this sublayer was created with a source based on dynamic layer capabilities of the service.
- See also
- initWithID:source:
- Since
- 100.1
◆ subLayerContents
|
readnonatomiccopyinherited |
This layer's sub-layers.
- Since
- 100
◆ subLayerContentsChangedHandler
- (void(^ subLayerContentsChangedHandler) (void)) |
|
readwritenonatomiccopyinherited |
Block that is invoked when the sub layer contents changes.
- Note
- The block will be invoked on the same thread on which the event occurred, which could be any arbitrary thread. You need to dispatch any UI related work to the main thread.
- Since
- 100
◆ sublayerID
|
readnonatomicassigninherited |
The ID of this sublayer.
- Since
- 100
◆ sublayers
|
readnonatomicstronginherited |
This sublayer's nested (child) sublayers.
- Note
- This array does not allow duplicate objects.
- Since
- 100
◆ table
The sublayer's backing table that is used to perform queries or identify features in the sublayer. This property remains nil
until the sublayer has been loaded and only applies to sublayers of type "Feature layer" or "Table". See AGSArcGISMapServiceSublayerInfo::sublayerType
to find out the type of this sublayer.
- Since
- 100.3
◆ visible
|
readwritenonatomicassigninherited |
Denotes whether the layer is visible or not. The visibility changes can be monitored using Key-Value Observing (KVO).
- Since
- 100
◆ visibleByDefault
- (BOOL) visibleByDefault |
|
readnonatomicassign |
The default visibility of this layer.
- Since
- 100