ArcGIS Runtime SDK for iOS: AGSAnnotationSublayer Class Reference
ArcGIS Runtime SDK for iOS  100.14
AGSAnnotationSublayer Class Reference

Description

Allows you to interrogate the properties of a sublayer within an annotation layer and to change the visibility of the sublayer.

You can get a collection of sublayers (AGSAnnotationSublayer) from the annotation layer using AGSLayerContent::subLayerContents. AGSAnnotationSublayer objects only exist as part of an AGSAnnotationLayer object, populated when the AGSAnnotationLayer is loaded. They cannot exist separately. Annotation sublayers offer finer control over your annotation, allowing the author to set different visual properties from the parent annotation layer. These visual properties include font, size, color, or different minimum and maximum scale ranges.

Since
100.6
Inheritance diagram for AGSAnnotationSublayer:
AGSObject <AGSLayerContent>

Instance Methods

(id< AGSCancelable >) - fetchLegendInfosWithCompletion:
 
(BOOL) - isVisibleAtScale:
 

Properties

BOOL canChangeVisibility
 
NSString * definitionExpression
 
double maxScale
 
double minScale
 
NSString * name
 
float opacity
 
BOOL scaleSymbols
 
BOOL showInLegend
 
NSArray< id< AGSLayerContent > > * subLayerContents
 
void(^ subLayerContentsChangedHandler )(void)
 
NSInteger sublayerID
 
BOOL visible
 

Method Documentation

◆ 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

◆ isVisibleAtScale:

- (BOOL) isVisibleAtScale: (double)  scale

Check whether this layer is visible at a given scale.

Since
100

Property Documentation

◆ canChangeVisibility

- (BOOL) canChangeVisibility
readrequirednonatomicassigninherited

Denotes whether the layer can change visibility or not.

Since
100

◆ definitionExpression

- (NSString*) definitionExpression
readnonatomiccopy

The where-clause of the sql expression that defines which annotation features from the feature table are selected into this sublayer. The definition expression string uses the SQL-92 where clause syntax (https://en.wikipedia.org/wiki/SQL-92). Be sure to escape special characters in the expression string as required for your platform. The DATE keyword expects the date format yyyy-mm-dd and the TIMESTAMP keyword expects the time stamp format yyyy-mm-dd hh:mm:ss. See the ArcGIS Blog article entitled "Querying Feature Services Date-Time Queries" (https://www.esri.com/arcgis-blog/products/api-rest/data-management/querying-feature-services-date-time-queries/) for more information.

Since
100.6

◆ maxScale

- (double) maxScale
readnonatomicassign

The maximum scale at which to display the Sublayer.

Since
100.6

◆ minScale

- (double) minScale
readnonatomicassign

The minimum scale at which to display the Sublayer. Zero indicates that the annotation will be visible no matter how far the user zooms out.

Since
100.6

◆ name

- (NSString*) name
readnonatomiccopyinherited

The name of the layer.

Since
100

◆ opacity

- (float) opacity
readnonatomicassign

Opacity is a value between 0 and 1, with 0 indicating that the annotation will be completely transparent, and 1 indicating that the annotation will be completely opaque.

Since
100.6

◆ scaleSymbols

- (BOOL) scaleSymbols
readnonatomicassign

The property specifies whether the annotation text scales with the AGSMapView. For annotation layers and sublayers this is always true.

Since
100.6

◆ showInLegend

- (BOOL) showInLegend
readwritenonatomicassigninherited

Indicates whether to show legend information.

Since
100

◆ subLayerContents

- (NSArray<id<AGSLayerContent> >*) 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

- (NSInteger) sublayerID
readnonatomicassign

Non-negative integer id number of the sublayer within its annotation layer

Since
100.6

◆ visible

- (BOOL) visible
readwritenonatomicassigninherited

Denotes whether the layer is visible or not. The visibility changes can be monitored using Key-Value Observing (KVO).

Since
100