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.
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< AGSLayerDelegate > | delegate |
NSError * | error |
AGSEnvelope * | fullEnvelope |
AGSEnvelope * | initialEnvelope |
BOOL | loaded |
NSString * | name |
NSOperationQueue * | operationQueue |
BOOL | renderNativeResolution |
AGSSpatialReference * | spatialReference |
UIImage * | thumbnail |
id< AGSTiledLayerTileDelegate > | tileDelegate |
AGSTileInfo * | tileInfo |
BOOL | timeAware |
AGSUnits | units |
- (void) dataChanged |
This method tells the layer that the data has changed and it should be redrawn.
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.
name | The name of the tile package, excluding the '.tpk' extension. |
- (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.
fullPath | The full path of the tile package, including the '.tpk' extension. |
- (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.
error | Information regarding the cause of the layer failing to load. |
- (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.
+ (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.
name | The name of the tile package, excluding the '.tpk' extension. |
+ (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.
fullPath | The full path of the package, including the '.tpk' extension. |
- (NSOperation<AGSTileOperation>*) retrieveImageAsyncForTile: | (AGSTile *) | tile |
Retrieve tile asynchronously. This method must be implemented by subclasses.
tile | The tile to get image for. |
NSOperation
that implements the protocol AGSTileOperation
for current tile request. - (NSString*) cachePath [read, copy] |
The full path to the tile package on disk.
- (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.
- (NSError*) error [read, retain, inherited] |
Information about the error associated with a layer.
- (AGSEnvelope*) fullEnvelope [read, assign, inherited] |
Full extent of the layer.
Implemented in AGSBingMapLayer, AGSGPResultLayer, and AGSOpenStreetMapLayer.
- (AGSEnvelope*) initialEnvelope [read, assign, inherited] |
Initial extent of the layer.
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.
- (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.
- (NSOperationQueue*) operationQueue [read, retain, inherited] |
Operation queue used by tiled layer to make asynchronous requests. Default operation queue size is 4.
- (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).
Implements AGSLayer.
- (AGSSpatialReference*) spatialReference [read, assign, inherited] |
The spatial reference of the layer.
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.
- (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.
- (AGSTileInfo*) tileInfo [read, retain, inherited] |
Tiling scheme for the layer. This property must be implemented by subclasses.
Implemented in AGSBingMapLayer, and AGSOpenStreetMapLayer.
- (BOOL) timeAware [read, assign, inherited] |
A property indicating whether the layer is time-aware.
- (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