10.2.5: AGSLayer(ForSubclassEyesOnly) Category Reference
10.2.5
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Pages
AGSLayer(ForSubclassEyesOnly) Category Reference

Description

This category organizes the methods that are relevant to subclassing a layer. Developer can create custom layers by paying special attention to the methods in this category.

Although you can sublcass AGSLayer directly to create a custom layer, it will often be easier to subclass AGSTiledLayer, AGSTiledServiceLayer, or AGSDynamicLayer.

If you want to implement a custom tiled layer, you should consider subclassing AGSTiledLayer or AGSTiledServiceLayer.

If you want to implement a custom dynamic layer, you should consider subclassing AGSDynamicLayer.

Regardless of what class you subclass, here are some guidelines If you implement a custom layer, you should set the error when drawing: If the layer draws successfully, you should set the error to nil. If the layer fails to draw the error should be set there as well.

Since
10.1.1
See also
AGSTiledLayer (ForSubclassEyesOnly)
AGSTiledServiceLayer (ForSubclassEyesOnly)
AGSDynamicLayer (ForSubclassEyesOnly)

Instance Methods

(int) - defaultDpi
 
(void) - layerDidFailToLoad:
 
(void) - layerDidLoad
 
(void) - mapDidUpdate:
 
(void) - spatialReferenceStatusInitialized
 

Properties

NSError * error
 
AGSMapViewmapView
 

Method Documentation

- (int) defaultDpi

The default dpi for the layer.

Since
10.1.1

Extends class AGSLayer.

- (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

Extends class AGSLayer.

- (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

Extends class AGSLayer.

- (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

Extends class AGSLayer.

- (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

Extends class AGSLayer.

Property Documentation

- (NSError*) error
readwritenonatomicstrong

Subclassses should set this property when the layer has an error loading or drawing.

Since
10.1.1

Extends class AGSLayer.

- (AGSMapView*) mapView
readwritenonatomicweak

The map that the layer is in.

Since
10.1.1

Extends class AGSLayer.