AGSWMSLayer Class Reference


Description

An instance of this class allows you to display maps from a WMS map service. This class searches for a spatial reference and extent in the root layer. If it cannot find one there it searches each layer contained in the root layer. If no spatial reference or extent is found the layer fails. For example, <a href=http://lasigpublic.nerc-lancaster.ac.uk/ArcGIS/services/Biodiversity/CSHedges/MapServer/WMSServer. 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:
AGSWMSLayer.h (ArcGIS library)
Since:
2.2
Inheritance diagram for AGSWMSLayer:
AGSDynamicLayer <AGSSecuredResource> AGSLayer

List of all members.

Public Member Functions

(void) - dataChanged
(NSOperation
< AGSDynamicLayerDrawingOperation > *) 
- exportMapImage:
(id) - initWithURL:
(id) - initWithURL:credential:
(void) - layerDidFailToLoad:
(void) - layerDidLoad

Static Public Member Functions

(id) + wmsLayerWithURL:
(id) + wmsLayerWithURL:credential:

Properties

NSString * copyright
AGSCredentialcredential
UIView< AGSLayerDelegate > * delegate
NSError * error
id< AGSExportMapImageDelegateexportDelegate
AGSEnvelopefullEnvelope
AGSDynamicLayerGPSAutoPanDrawingMode gpsAutoPanDrawingMode
AGSImageFormat imageFormat
AGSEnvelopeinitialEnvelope
NSArray * layerInfos
BOOL loaded
double maxScale
double minScale
NSString * name
BOOL renderNativeResolution
AGSSpatialReferencespatialReference
BOOL timeAware
BOOL transparent
AGSUnits units
NSString * version
NSArray * visibleLayers

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.

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

Initialize this layer with a URL of a WMS Server dynamic map service.

Parameters:
url URL to a WMS dynamic map service.
Returns:
A new dynamic WMS layer object.
Since:
2.2
- (id) initWithURL: (NSURL *)  url
credential: (AGSCredential *)  cred 

Initialize this layer with a URL of a WMS Server dynamic map service as well as a credential to a secured resource.

Parameters:
url URL to a WMS dynamic map service.
cred AGSCredential to access a secured resource.
Returns:
A new dynamic WMS layer object.
Since:
2.2
- (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) wmsLayerWithURL: (NSURL *)  url  

A method to get an initialized, autoreleased layer with a URL of a WMS map service.

Parameters:
url URL to a WMS map service.
Returns:
A new, autoreleased, WMS map service layer object.
Since:
2.2
+ (id) wmsLayerWithURL: (NSURL *)  url
credential: (AGSCredential *)  cred 

A method to get an initialized, autoreleased layer with a URL of a WMS map service.

Parameters:
url URL to WMS map service.
cred AGSCredential used to access a secured resource.
Returns:
A new, autoreleased, WMS map service layer object.
Since:
2.2

Property Documentation

- (NSString*) copyright [read, copy]

The copyright info for the layer.

Since:
2.2
- (AGSCredential*) credential [read, copy]

The credential to be used to access this layer's secured map service.

Since:
2.2

Reimplemented from <AGSSecuredResource>.

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

The image format of the map. Possible values include

  • AGSImageFormatPNG32
  • AGSImageFormatPNG24
  • AGSImageFormatPNG8
  • AGSImageFormatPNG
  • AGSImageFormatJPG
  • AGSImageFormatGIF

Please ensure the map service supports the requested image format.

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

Initial extent of the layer.

Since:
1.0

Implemented in AGSBingMapLayer, AGSGPResultLayer, AGSGraphicsLayer, and AGSOpenStreetMapLayer.

- (NSArray*) layerInfos [read, retain]

A list of AGSWMSLayerInfo objects, which contain the name, title, and extent of each subLayer.

Since:
2.2
- (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.

- (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, assign, inherited]

Gets a value that determines if the layer renders at the native resolution. This property will not have any affect on 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. If YES, this layer will use more memory and network bandwidth, but the layer will render at a higher resolution. This property is not settable for every layer type.

Since:
2.1

Implemented in AGSGPResultLayer, AGSGraphicsLayer, AGSDynamicMapServiceLayer, AGSImageServiceLayer, AGSTiledMapServiceLayer, and AGSLocalTiledLayer.

- (AGSSpatialReference*) spatialReference [read, retain]

The spatial reference of the layer, must be a valid EPSG code.

Since:
2.2

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:
2.2
- (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
- (NSString*) version [read, copy]

The version of the layer.

Since:
2.2
- (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. To exclude certain layers from the image, you need to set this property to an array containing the names of each AGSWMSLayerInfo that needs to be included in the image. The layers that are left out will not be included in the image.

Since:
2.2