10.2.5: AGSLayer Class Reference
10.2.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
AGSLayer Class Reference

Description

A base class for all layers, tiled or dynamic. Sub-classes must provide valid values for the spatialReference, fullEnvelope, and initialEnvelope properties declared by this class.

Notifications

All layers post AGSLayerDidLoadNotification , AGSLayerDidFailToLoadNotification, and AGSLayerDidInitializeSpatialReferenceStatusNotification

See also
Conceptual Doc: Overview of Layers
Since
1.0
Inheritance diagram for AGSLayer:
AGSDynamicLayer AGSFeatureTableLayer AGSGraphicsLayer AGSGroupLayer AGSTiledLayer AGSDynamicMapServiceLayer AGSGPResultLayer AGSImageServiceLayer AGSWMSLayer AGSFeatureLayer AGSSketchGraphicsLayer AGSLocalTiledLayer AGSTiledServiceLayer

Instance Methods

(int) - defaultDpi
 
(BOOL) - isInScale
 
(void) - layerDidFailToLoad:
 
(void) - layerDidLoad
 
(void) - mapDidUpdate:
 
(void) - refresh
 
(void) - spatialReferenceStatusInitialized
 

Properties

id< AGSLayerDelegatedelegate
 
NSError * error
 
AGSEnvelopefullEnvelope
 
AGSEnvelopeinitialEnvelope
 
BOOL loaded
 
AGSMapViewmapView
 
double maxScale
 
double minScale
 
NSString * name
 
CGFloat opacity
 
BOOL renderNativeResolution
 
AGSSpatialReferencespatialReference
 
BOOL spatialReferenceStatusValid
 
BOOL timeAware
 
BOOL visible
 

Method Documentation

- (int) defaultDpi

The default dpi for the layer.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

- (BOOL) isInScale

Indicates whether the map's scale is within this layer's scale range (minScale and maxScale).

Since
10.1.1
- (void) layerDidFailToLoad: (NSError *)  error

Subclasses should call this when the layer fails to load. Implementation for this method is provided by the framework.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

- (void) layerDidLoad

Subclasses should call this when the layer is ready to draw. Implementation for this method is provided by the framework.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

- (void) mapDidUpdate: (AGSMapUpdateType updateType

Method called when the map is updated. You can override this, but make sure to call the super's implementation.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

- (void) refresh

This method tells the layer that it should refresh its data and redraw.

Since
10.1.1

Implemented in AGSFeatureLayer, and AGSGraphicsLayer.

- (void) spatialReferenceStatusInitialized

Called when the status of the layer's spatial reference has been established. You can override this method, just make sure to call the super's implementation.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

Property Documentation

- (id<AGSLayerDelegate>) delegate
readwritenonatomicweak

Delegate to be notified when the layer is loaded or fails to load.

Since
1.0
- (NSError*) error
readnonatomicstrong

Information about the error associated with a layer.

Since
1.0

Provided by category AGSLayer(ForSubclassEyesOnly).

- (AGSEnvelope*) fullEnvelope
readnonatomicstrong

Full extent of the layer.

Since
1.0
- (AGSEnvelope*) initialEnvelope
readwritenonatomicstrong

Gets or sets the initial envelope of the layer.

Since
1.0
- (BOOL) loaded
readnonatomicassign

Indicates that this layer loaded successfully.

Since
1.0
- (AGSMapView*) mapView
readwritenonatomicweak

The map that the layer is in.

Since
10.1.1

Provided by category AGSLayer(ForSubclassEyesOnly).

- (double) maxScale
readwritenonatomicassign

The maximum scale at which this layer is visible. If the map is zoomed in beyond this scale, the layer will not be visible.

Since
1.0
- (double) minScale
readwritenonatomicassign

The minimum scale at which this layer is visible. If the map is zoomed out beyond this scale, the layer will not be visible.

Since
1.0
- (NSString*) name
readwritenonatomiccopy

The name of this layer

Since
10.1.1
- (CGFloat) opacity
readwritenonatomicassign

The opacity of this layer as a value between 0(fully transparent) and 1(fully opaque)

Since
10.1.1
- (BOOL) renderNativeResolution
readwritenonatomicassign

Gets a value that determines if the layer renders at the native resolution. This property will not have any affect on iOS devices without a retina display. If using an iOS device with a retina display and you want to take advantage of that display you can set this value to YES. If YES, this layer will use more memory and network bandwidth, but the layer will render at a higher resolution. This property is not settable for every layer type.

Since
2.1
- (AGSSpatialReference*) spatialReference
readnonatomicstrong

The spatial reference of the layer.

Since
1.0
- (BOOL) spatialReferenceStatusValid
readwritenonatomicassign

This property will be NO until the spatial reference status has been initialized. See the layer:didInitializeSpatialReferenceStatus method on delegate for more information.

- (BOOL) timeAware
readnonatomicassign

A property indicating whether the layer is time-aware.

Since
1.0
- (BOOL) visible
readwritenonatomicassign

Indicates whether this layer should be visible in the map.

Since
10.1.1