AGSTiledMapServiceLayer Class Reference
Description
An instance of this class allows you to display maps from a cached map service of ArcGIS Server. For example, http://server.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer. A cached map service uses a cache of pre-generated tiles to create a map instead of dynamically generating map images.
In a Model-View-Controller architecture, this object represents the Model. The corresponding View object, AGSTiledLayerView
, is created when this layer is added to the map.
- Defined in:
- AGSTiledMapServiceLayer.h (ArcGIS library)
- Since:
- 1.0
- See also:
- AGSDynamicMapServiceLayer for dynamic map services.
List of all members.
Member Function Documentation
- ((deprecated) __attribute__ |
|
|
|
|
AGSTiledMapServiceLayer
maintains a local cache on the device containing tiles retrieved from the map service. This makes redrawing the map much faster and also reduces overall network usage. This method can be used to clear the local cache if, for instance, the tiles of the map service have changed.
- Returns:
- Returns
NO
if no tiles are removed from the cache.
- Since:
- 1.0
- Deprecated:
- Deprecated at 2.0. Use [AGSTileRequestOperation clearAGSTiles] instead.
This method tells the layer that the data has changed and it should be redrawn.
- Since:
- 1.0
Implemented in AGSGraphicsLayer.
- (void) decodeWithJSON: |
|
(NSDictionary *) |
json |
|
[optional, inherited] |
Decode object from JSON representation.
- Parameters:
-
| json | The JSON representation of the object to be decoded. |
- Since:
- 1.0
- (NSDictionary *) encodeToJSON |
|
|
|
[optional, inherited] |
Encode and return JSON representation for object.
- Returns:
- JSON representation of object.
- Since:
- 1.0
- (id) initWithJSON: |
|
(NSDictionary *) |
json |
|
[optional, inherited] |
Initialize and return object from JSON representation.
- Parameters:
-
| json | The JSON representation of the object to be created. |
- Returns:
- Object decoded from JSON representation.
- Since:
- 1.0
- (id) initWithJSON: |
|
(NSDictionary *) |
json |
|
|
For completeness, this is to be used when you have a raw dictionary from the REST endpoint.
- Parameters:
-
| json | The JSON dictionary to initialize an AGSTiledMapServiceLayer . |
| url | URL to the tiled map service. |
- Returns:
- A new tiled map service object.
- Deprecated:
- Deprecated at 2.0. Use initWithJSON:URL:credential: instead
- Since:
- 1.0
- (id) initWithJSON: |
|
(NSDictionary *) |
json |
URL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
For completeness, this is to be used when you have a raw dictionary from the REST endpoint.
- Parameters:
-
| json | The JSON dictionary to initialize a tiled map service layer. |
| url | URL pointing to a dynamic map resource. |
| cred | The credential. |
- Returns:
- A new tiled map service object.
- Since:
- 2.0
Initialize this layer with an AGSMapServiceInfo
object. You can use this method if you already have an AGSMapServiceInfo
so that another round trip to the server does not occur to retrieve this information.
- Parameters:
-
| info | Previously retrieved map service info. |
- Returns:
- A new tiled map service layer object.
- Since:
- 1.0
- (id) initWithURL: |
|
(NSURL *) |
url |
|
|
Initialize this layer with a URL to an ArcGIS Server cached map service.
- Parameters:
-
| url | URL to cached map service. |
- Returns:
- A new tiled map service layer object.
- Since:
- 1.0
- (id) initWithURL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
Initialize this layer with a URL to an ArcGIS Server cached map service with a specified credential object.
- Parameters:
-
| url | URL to a cached map service. |
| cred | AGSCredential used to access the secured resource. |
- Returns:
- A new tiled map service layer object.
- Since:
- 1.0
- (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
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
- (void) resubmitWithURL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
If the layer failed to load with a specific url and credential, you can resubmit it with a new URL and credential. This function does nothing if the layer is already loaded. This function also does nothing if the layer is currently trying to load.
- Parameters:
-
| url | URL to the tiled map service. |
| cred | AGSCredential used to access the secured resource. |
- Since:
- 1.0
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
A method to get an initialized, autoreleased map service layer using an AGSMapServiceInfo
object. Use this method if you already have an AGSMapServiceInfo
so that another round trip to the server does not occur to retrieve this information.
- Parameters:
-
| info | Previously retrieved map service info. |
- Returns:
- A new, autoreleased, tiled map service layer object.
- Since:
- 1.0
+ (id) tiledMapServiceLayerWithURL: |
|
(NSURL *) |
url |
|
|
A method to get an initialized, autoreleased object using a URL to an ArcGIS Server cached map service.
- Parameters:
-
| url | URL to a cached map service. |
- Returns:
- A new, autoreleased, tiled map service layer object.
- Since:
- 1.0
+ (id) tiledMapServiceLayerWithURL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
A method to get an initialized, autoreleased object using a URL to an ArcGIS Server cached map service and a credential.
- Parameters:
-
| url | URL to a cached map service. |
| cred | AGSCredential used to access the secured resource. |
- Returns:
- A new, autoreleased, tiled map service layer object.
- Since:
- 1.0
Property Documentation
The credential to be used to access secured resources.
- Since:
- 1.0
Reimplemented from <AGSSecuredResource>.
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] |
- (AGSEnvelope*) initialEnvelope [read, assign, inherited] |
- (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
Information about the map service.
- Since:
- 1.0
- (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 improvement when rendering at native resolution. Typically, most tiles are generated only at 96 DPI and do not look any better at native resolution.
When rendering at the native resolution, this layer will use more network bandwidth and memory (because more tiles will need to be fetched and displayed).
- Since:
- 2.1
Implements AGSLayer.
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
- (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
- (NSURL*) URL [read, copy] |