AGSImageServiceLayer Class Reference


Description

An instance of this class allows you to display maps from an image service of ArcGIS Server. For example: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/World/MODIS/ImageServer.

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:
AGSImageServiceLayer.h (ArcGIS library)
Since:
1.0
Inheritance diagram for AGSImageServiceLayer:
AGSDynamicLayer <AGSCoding> <AGSSecuredResource> AGSLayer

List of all members.

Public Member Functions

(void) - dataChanged
(void) - decodeWithJSON:
(NSDictionary *) - encodeToJSON
(NSOperation
< AGSDynamicLayerDrawingOperation > *) 
- exportMapImage:
(id) - initWithJSON:
(id) - initWithJSON:URL:credential:
(id) - initWithURL:
(id) - initWithURL:credential:
(void) - layerDidFailToLoad:
(void) - layerDidLoad
(void) - resubmitWithURL:credential:

Static Public Member Functions

(id) + imageServiceLayerWithURL:
(id) + imageServiceLayerWithURL:credential:

Properties

NSArray * bandIds
NSUInteger compressionQuality
AGSCredentialcredential
id< AGSLayerDelegatedelegate
NSError * error
id< AGSExportMapImageDelegateexportDelegate
AGSImageFormat format
AGSEnvelopefullEnvelope
AGSDynamicLayerGPSAutoPanDrawingMode gpsAutoPanDrawingMode
AGSImageServiceInfoimageServiceInfo
AGSEnvelopeinitialEnvelope
AGSInterpolation interpolation
BOOL loaded
double maxScale
double minScale
AGSMosaicRulemosaicRule
NSString * name
NSUInteger noData
AGSRasterFunctionrenderingRule
BOOL renderNativeResolution
AGSSpatialReferencespatialReference
BOOL timeAware
AGSUnits units
NSURL * URL

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.

- (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
- (NSOperation<AGSDynamicLayerDrawingOperation>*) exportMapImage: (AGSExportImageParams *)  params  

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) imageServiceLayerWithURL: (NSURL *)  url  

A method to get an initalized and autoreleased layer using a URL to an ArcGIS Server image service.

Parameters:
url URL pointing to an image service.
Returns:
A new, autoreleased, image service layer.
Since:
1.0
+ (id) imageServiceLayerWithURL: (NSURL *)  url
credential: (AGSCredential *)  cred 

A method to get an initalized and autoreleased layer using a credential and URL to an ArcGIS Server image service.

Parameters:
url URL pointing to an image service.
cred AGSCredential used to access secure service.
Returns:
A new, autoreleased, image service layer.
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
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 the layer.
url URL to initialize the layer.
cred AGSCredential used to access secure service.
Returns:
A new object.
Since:
2.0
- (id) initWithURL: (NSURL *)  url  

Initalize this layer with a URL to an ArcGIS Server image service.

Parameters:
url URL pointing to an image service.
Returns:
A new, initialized, image serivce layer.
Since:
1.0
- (id) initWithURL: (NSURL *)  url
credential: (AGSCredential *)  cred 

Initalize this layer with a credential and URL to an ArcGIS Server image service.

Parameters:
url URL pointing to an image service.
cred AGSCredential used to access secure service.
Returns:
A new, initialized, image serivce layer.
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
- (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
- (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 pointing to an image service.
cred AGSCredential used to access the secured resource.
Since:
1.0

Property Documentation

- (NSArray*) bandIds [read, write, retain]

The IDs of bands which are to be included in the map image. The band IDs are numbered from 0 to the AGSImageServiceInfo bandCount property - 1. You can request for the image to contain 1 band, in which case it will be a gray scale image, or 3 bands for color images.

Since:
1.0
- (NSUInteger) compressionQuality [read, write, assign]

The compression quality of maps generated by the image service. The value can be between 0 - 100. Compression only applies to lossy image formats such as JPEG (JPG).

  • A value of 0 means maximum compression (lowest quality)
  • A value of 100 means minimum compression (highest quality)
Since:
1.0
- (AGSCredential*) credential [read, copy]

The credential to be used to access secured resources.

Since:
1.0

Reimplemented from <AGSSecuredResource>.

- (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
- (id<AGSExportMapImageDelegate>) exportDelegate [read, write, assign, inherited]

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
- (AGSImageFormat) format [read, write, assign]

Map image format. If no format is specified the format is set to the server default which is jpgpng.

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

Full extent of the layer.

Since:
1.0

Implemented in AGSBingMapLayer, AGSGPResultLayer, and AGSOpenStreetMapLayer.

- (AGSDynamicLayerGPSAutoPanDrawingMode) gpsAutoPanDrawingMode [read, write, 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
- (AGSImageServiceInfo*) imageServiceInfo [read, retain]

Information about the image service.

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

Initial extent of the layer.

Since:
1.0

Implemented in AGSBingMapLayer, AGSGPResultLayer, AGSGraphicsLayer, and AGSOpenStreetMapLayer.

- (AGSInterpolation) interpolation [read, write, assign]

Current interpolation method. Interpolation techniques specify how to approximate pixel values for map images based on pixel values of the raster data. In simpler terms, interpolation is the process by which an image is resized or resampled.

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
- (double) maxScale [read, assign, inherited]

The maximum scale of the layer.

Since:
1.0

Implemented in AGSGraphicsLayer.

- (double) minScale [read, assign, inherited]

The minimum scale of the layer.

Since:
1.0

Implemented in AGSGraphicsLayer.

- (AGSMosaicRule*) mosaicRule [read, write, retain]

Specifies the mosaic rule. Image Services based on mosaic datasets may contain many overlapping rasters. A mosaic rule defines the order in which rasters are combined together to create a map image.

Since:
1.8
- (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
- (NSUInteger) noData [read, write, assign]

The pixel value that represents no information.

Since:
1.8
- (AGSRasterFunction*) renderingRule [read, write, retain]

Specifies the rendering rule for how the requested map image should be rendered. Rendering rules allows you to perform complex processing, such as computing hillshade or slope, on raster data of an Image Service. The source data is not changed. Instead, processing is performed on-the-fly while generating map images.

Refer to the REST API documentation for more information about supported raster functions.

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.

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

The spatial reference of the layer.

Since:
1.0

Implemented in AGSBingMapLayer, AGSGPResultLayer, 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
- (NSURL*) URL [read, retain]

URL of the image service resource in the ArcGIS Server REST Services Directory.

Since:
1.0