AGSLocalTiledLayer Class Reference


Description

This object represents a local tiled layer that can display map contents from a tile package (.tpk file) on the device. This layer can function even when the device does not have any network connectivity.

See also:
Conceptual Doc: Using a local tiled layer
Sample: Local Tiled Layer
Since:
2.1
Inheritance diagram for AGSLocalTiledLayer:
AGSTiledLayer <AGSLocalTiledLayer> AGSLayer

List of all members.

Public Member Functions

(void) - dataChanged
(id) - initWithName:
(id) - initWithPath:
(void) - layerDidFailToLoad:
(void) - layerDidLoad
(NSOperation< AGSTileOperation > *) - retrieveImageAsyncForTile:

Static Public Member Functions

(id) + localTiledLayerWithName:
(id) + localTiledLayerWithPath:

Properties

NSString * cachePath
id< AGSLayerDelegatedelegate
NSError * error
AGSEnvelopefullEnvelope
AGSEnvelopeinitialEnvelope
BOOL loaded
NSString * name
NSOperationQueue * operationQueue
BOOL renderNativeResolution
AGSSpatialReferencespatialReference
UIImage * thumbnail
id< AGSTiledLayerTileDelegatetileDelegate
AGSTileInfotileInfo
BOOL timeAware
AGSUnits units

Member Function Documentation

- (void) dataChanged  

This method tells the layer that the data has changed and it should be redrawn.

Since:
1.0

Implemented in AGSGraphicsLayer.

- (id) initWithName: (NSString *)  name  

Initialize a local layer with the name of a cache within the application bundle, or the application's shared Documents directory.

Parameters:
name The name of the tile package, excluding the '.tpk' extension.
Returns:
A new local tiled layer object.
Since:
2.1
- (id) initWithPath: (NSString *)  fullPath  

Initialize a local layer with the full path to a tile package within the application bundle, or the application's shared Documents directory.

Parameters:
fullPath The full path of the tile package, including the '.tpk' extension.
Returns:
A new local tiled layer object.
Since:
2.1
- (void) layerDidFailToLoad: (NSError *)  error  

Method to notify the delegate that a layer failed to load. This method will also post a "LayerFailedToLoad" notification that can be observed by the developer.

Parameters:
error Information regarding the cause of the layer failing to load.
Since:
1.0
- (void) layerDidLoad  

Method to notify the delegate that a layer successfully loaded. This method will also post a "LayerDidLoad" notification that can be observed by the developer.

Since:
1.0
+ (id) localTiledLayerWithName: (NSString *)  name  

A method to get an initialized, autoreleased object using the name of a tile package residing withing the application bundle, or the shared Documents directory.

Parameters:
name The name of the tile package, excluding the '.tpk' extension.
Returns:
A new, autoreleased, local tiled layer object.
Since:
2.1
+ (id) localTiledLayerWithPath: (NSString *)  fullPath  

A method to get an initialized, autoreleased object using the full path to a tile package residing withing the application bundle, or the application's shared Documents directory.

Parameters:
fullPath The full path of the package, including the '.tpk' extension.
Returns:
A new, autoreleased, local tiled layer object.
Since:
2.1
- (NSOperation<AGSTileOperation>*) retrieveImageAsyncForTile: (AGSTile *)  tile  

Retrieve tile asynchronously. This method must be implemented by subclasses.

Parameters:
tile The tile to get image for.
Returns:
NSOperation that implements the protocol AGSTileOperation for current tile request.
Since:
1.0
See also:
AGSTiledLayerTileDelegate

Property Documentation

- (NSString*) cachePath [read, copy]

The full path to the tile package on disk.

Since:
2.1
- (id<AGSLayerDelegate>) delegate [read, write, assign, inherited]

Delegate to be notified when the layer is loaded or fails to load. When this layer is loaded, a corresponding AGSLayerView object is automatically set as the delegate. This delegate must not be replaced.

Since:
1.0
- (NSError*) error [read, retain, inherited]

Information about the error associated with a layer.

Since:
1.0
- (AGSEnvelope*) fullEnvelope [read, assign, inherited]

Full extent of the layer.

Since:
1.0

Implemented in AGSBingMapLayer, AGSGPResultLayer, and AGSOpenStreetMapLayer.

- (AGSEnvelope*) initialEnvelope [read, assign, inherited]

Initial extent of the layer.

Since:
1.0

Implemented in AGSBingMapLayer, AGSGPResultLayer, AGSGraphicsLayer, and AGSOpenStreetMapLayer.

- (BOOL) loaded [read, assign, inherited]

A property indicating whether the layer is loaded and ready to be used. When the layer is loaded, the value becomes YES, and layer properties can be accessed.

Since:
1.0
See also:
AGSLayerDelegate
- (NSString*) name [read, retain, inherited]

The name of the layer. This property will be set by the framework when the layer is added to the map.

Since:
1.8
- (NSOperationQueue*) operationQueue [read, retain, inherited]

Operation queue used by tiled layer to make asynchronous requests. Default operation queue size is 4.

Since:
1.0
- (BOOL) renderNativeResolution [read, write, assign]

Flag indicating if the layer renders at the native resolution. This property will not have any affect 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. The property must be set before the layer loads.

Note, the tiles should have been generated at 192 DPI to have a perceptible improvment when rendering at native resolution. Typically, most tiles are generated only at 96 DPI and do not look better at native resolution.

When rendering at the native resolution, this layer will use more memory (because more tiles will need to be displayed).

Since:
2.1

Implements AGSLayer.

- (AGSSpatialReference*) spatialReference [read, assign, inherited]

The spatial reference of the layer.

Since:
1.0

Implemented in AGSBingMapLayer, AGSGPResultLayer, and AGSOpenStreetMapLayer.

- (UIImage*) thumbnail [read, retain]

Returns a thumbnail image, if present, within the compact cache or tile package. The file exists, by default, within a tile package, but can be added at the root level of a zipped cache.

Since:
2.1
- (id<AGSTiledLayerTileDelegate>) tileDelegate [read, write, assign, inherited]

Delegate to be notified when a tile is retrieved asynchronously. When this layer is loaded, a corresponding View object is automatically set as the tileDelegate which should not be replaced.

Since:
1.0
- (AGSTileInfo*) tileInfo [read, retain, inherited]

Tiling scheme for the layer. This property must be implemented by subclasses.

Since:
1.0

Implemented in AGSBingMapLayer, and AGSOpenStreetMapLayer.

- (BOOL) timeAware [read, assign, inherited]

A property indicating whether the layer is time-aware.

Since:
1.0
- (AGSUnits) units [read, write, assign, inherited]

The units the layer is in. Possible values include

  • AGSUnitsCentimeters
  • AGSUnitsDecimalDegrees
  • AGSUnitsDecimeters
  • AGSUnitsFeet
  • AGSUnitsInches
  • AGSUnitsKilometers
  • AGSUnitsMeters
  • AGSUnitsMiles
  • AGSUnitsMillimeters
  • AGSUnitsNauticalMiles
  • AGSUnitsPoints
  • AGSUnitsUnknown
  • AGSUnitsYards
Since:
1.0