AGSDynamicMapServiceLayer Class Reference
Description
An instance of this class allows you to display maps from a dynamic map service of ArcGIS Server. For example, http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer. A dynamic map service generates map images on the fly.
In a Model-View-Controller architecture, this object represents the Model. The corresponding View object, AGSDynamicLayerView
, is created when this layer is added to the map.
- Defined in:
- AGSDynamicMapServiceLayer.h (ArcGIS library)
- See also:
- AGSTiledMapServiceLayer for cached map services.
- Since:
- 1.0
List of all members.
Member Function Documentation
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
A method to get an initialized, autoreleased 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, dynamic map service layer object.
- Since:
- 1.0
+ (id) dynamicMapServiceLayerWithURL: |
|
(NSURL *) |
url |
|
|
A method to get an initialized, autoreleased layer with a URL of an ArcGIS Server dynamic map service.
- Parameters:
-
| url | URL to a dynamic map service. |
- Returns:
- A new, autoreleased, dynamic map service layer object.
- Since:
- 1.0
+ (id) dynamicMapServiceLayerWithURL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
A method to get an initialized, autoreleased layer with a URL of an ArcGIS Server dynamic map service.
- Parameters:
-
| url | URL to dynamic map service. |
| cred | AGSCredential used to access a secured resource. |
- Returns:
- A new, autoreleased, dynamic map service layer object.
- Since:
- 1.0
- (NSDictionary *) encodeToJSON |
|
|
|
[optional, inherited] |
Encode and return JSON representation for object.
- Returns:
- JSON representation of object.
- Since:
- 1.0
Get new map image. The exportDelegate is notified when the image is exported. This method must be implemented by subclasses.
- Parameters:
-
| params | The input parameters for the export image operation. |
- 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 a dynamic map service layer. |
| url | URL pointing to a dynamic map resource. |
- Returns:
- A new AGSDynamicMapServiceLayer 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 dynamic map service layer. |
| url | URL pointing to a dynamic map resource. |
| cred | The credential |
- Returns:
- A new AGSDynamicMapServiceLayer object.
- Since:
- 2.0
Initialize this layer with 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 dynamic map service layer object.
- Since:
- 1.0
- (id) initWithURL: |
|
(NSURL *) |
url |
|
|
Initialize this layer with a URL of an ArcGIS Server dynamic map service
- Parameters:
-
| url | URL to a dynamic map service. |
- Returns:
- A new dynamic map service layer object.
- Since:
- 1.0
- (id) initWithURL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
Initialize this layer with a URL of an ArcGIS Server dynamic map service as well as a credential to a secured resource.
- Parameters:
-
| url | URL to a dynamic map service. |
| cred | AGSCredential to access a secured resource. |
- Returns:
- A new dynamic 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 dynamic map service. |
| cred | AGSCredential to access the secured resource. |
- Since:
- 1.0
Property Documentation
The credential to be used to access this layer's secured map service.
- 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
- (NSUInteger) dpi [read, write, assign] |
The DPI (dots-per-inch) resolution of map images generated by this layer's map service. The dpi will default to a value that takes into account the dpi of the device and the value of the renderNativeResolution property. If you programmatically change the dpi, it will then cease to change when the renderNativeResolution property changes.
- Since:
- 1.0
- (NSError*) error [read, retain, inherited] |
Information about the error associated with a layer.
- Since:
- 1.0
Delegate to be notified of events related to exporting the map image. When this layer is loaded, a corresponding View object is automatically set as the exportDelegate
which should not be replaced.
- Since:
- 1.0
- (AGSEnvelope*) fullEnvelope [read, assign, inherited] |
Defines the drawing behavior for a dynamic layer when the map's gps is in an auto-pan mode. For some layers, especially those that make network request, you may want this property accordingly. When the map is navigating from the gps it can generate a lot of requests resulting in a heavy server load.
- Since:
- 2.1
The image format of the map. Possible values include
AGSImageFormatPNG32
AGSImageFormatPNG24
AGSImageFormatPNG8
AGSImageFormatPNG
AGSImageFormatJPG
AGSImageFormatGIF
Please consult the ArcGIS Server REST Services Directory to ensure the map service supports the requested image format.
- Since:
- 1.0
- (AGSEnvelope*) initialEnvelope [read, assign, inherited] |
- (NSArray*) layerDefinitions [read, write, retain] |
The array of AGSLayerDefinition
objects that allow you to filter the features of individual layers in the exported map image.
- Since:
- 1.0
- (NSArray*) layerTimeOptions [read, write, retain] |
An array of AGSLayerTimeOptions
specifiying time related properties for time-aware sub-layers. By default, this array is nil, and the defaults specified in the service are used.
- Since:
- 1.8
- (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 this layer's map service.
- Since:
- 1.0
- (double) maxScale [read, assign, inherited] |
- (double) minScale [read, assign, inherited] |
- (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
- (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.
When rendering at the native resolution, this layer will use more network bandwidth and memory (because the map images will be bigger).
- Since:
- 2.1
Implements AGSLayer.
- (BOOL) timeAware [read, assign, inherited] |
A property indicating whether the layer is time-aware.
- Since:
- 1.0
- (BOOL) transparent [read, write, assign] |
A property indicating whether or not images generated by this layer's map service should be transparent.
- 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] |
- (NSArray*) visibleLayers [read, write, retain] |
The sub-layers to be included in the map image exported by the map service. By default, the array is nil, and the default visibility specified in each sub-layer's AGSMapServiceLayerInfo
is used in conjunction with its minimum and maximum scale to determine whether it should be included in the map image.
To exclude certain layers from the image, you need to set this property to an array containing layerId
of each AGSMapServiceLayerInfo
that needs to be included in the image. The layers that are left out will not be included in the image.
- Since:
- 1.0