# OpenLayers.Layer.ArcIMS

Instances of OpenLayers.Layer.ArcIMS are used to display data from ESRI ArcIMS Mapping Services. Create a new ArcIMS layer with the OpenLayers.Layer.ArcIMS constructor.

#### Inherits from

- OpenLayers.Layer.Grid

Summary

OpenLayers.Layer.ArcIMS | Instances of OpenLayers.Layer.ArcIMS are used to display data from ESRI ArcIMS Mapping Services.
Constants |
DEFAULT_PARAMS | {Object} Default query string parameters.
Properties |
featureCoordSys | {String} Code for feature coordinate system.
filterCoordSys | {String} Code for filter coordinate system.
layers | {Array} An array of objects with layer properties.
async | {Boolean} Request images asynchronously.
name | {String} Layer name.
isBaseLayer | {Boolean} The layer is a base layer.
Constants |
DEFAULT_OPTIONS | {Object} Default layers properties.
Constructor |
OpenLayers.Layer.ArcIMS | Create a new ArcIMS layer object.
Functions |
getURL | Return an image url this layer.
getURLasync | Get an image url this layer asynchronously, and execute a callback when the image url is generated.
getUrlOrImage | Extract a url or image from the ArcXML image output.
setLayerQuery | Set the query definition on this layer.
getFeatureInfo | Get feature information from ArcIMS.
clone | Create a clone of this layer

### Constants

### DEFAULT_PARAMS

{Object} Default query string parameters.

### Properties

### featureCoordSys

{String} Code for feature coordinate system. Default is “4326”.

### filterCoordSys

{String} Code for filter coordinate system. Default is “4326”.

### layers

{Array} An array of objects with layer properties.

### async

{Boolean} Request images asynchronously. Default is true.

### name

{String} Layer name. Default is “ArcIMS”.

### isBaseLayer

{Boolean} The layer is a base layer. Default is true.

### Constants

### DEFAULT_OPTIONS

{Object} Default layers properties.

### Constructor

### OpenLayers.Layer.ArcIMS

Create a new ArcIMS layer object.

#### Example

>     var arcims = new OpenLayers.Layer.ArcIMS(
>         "Global Sample",
>         "http://sample.avencia.com/servlet/com.esri.esrimap.Esrimap",
>         {
>             service: "OpenLayers_Sample",
>             layers: [
>                 // layers to manipulate
>                 {id: "1", visible: true}
>             ]
>         }
>     );

#### Parameters

name | {String} A name for the layer
url | {String} Base url for the ArcIMS server
options | {Object} Optional object with properties to be set on the layer.

### Functions

### getURL

> getURL: function( | bounds | )

Return an image url this layer.

#### Parameters

bounds | {OpenLayers.Bounds} A bounds representing the bbox for the request.

#### Returns

{String} A string with the map image’s url.

### getURLasync

> getURLasync: function( | bounds,
> | callback,
> | scope | )

Get an image url this layer asynchronously, and execute a callback when the image url is generated.

#### Parameters

bounds | {OpenLayers.Bounds} A bounds representing the bbox for the request.
callback | {Function} Function to call when image url is retrieved.
scope | {Object} The scope of the callback method.

### getUrlOrImage

> getUrlOrImage: function( | output | )

Extract a url or image from the ArcXML image output.

#### Parameters

output | {Object} The image.output property of the object returned from the ArcXML format read method.

#### Returns

{String} A URL for an image (potentially with the data protocol).

### setLayerQuery

> setLayerQuery: function( | id,
> | querydef | )

Set the query definition on this layer. Query definitions are used to render parts of the spatial data in an image, and can be used to filter features or layers in the ArcIMS service.

#### Parameters

id | {String} The ArcIMS layer ID.
querydef | {Object} The query definition to apply to this layer.

### getFeatureInfo

> getFeatureInfo: function( | geometry,
> | layer,
> | options | )

Get feature information from ArcIMS. Using the applied geometry, apply the options to the query (buffer, area/envelope intersection), and query the ArcIMS service.

#### A note about accuracy

ArcIMS interprets the accuracy attribute in feature requests to be something like the ‘modulus’ operator on feature coordinates, applied to the database geometry of the feature. It doesn’t round, so your feature coordinates may be up to (1 x accuracy) offset from the actual feature coordinates. If the accuracy of the layer is not specified, the accuracy will be computed to be approximately 1 feature coordinate per screen pixel.

#### Parameters

geometry | {OpenLayers.LonLat} or {OpenLayers.Geometry.Polygon} The geometry to use when making the query. This should be a closed polygon for behavior approximating a free selection.
layer | {Object} The ArcIMS layer definition. This is an anonymous object that looks like:

>     {
>         id: "ArcXML layer ID",  // the ArcXML layer ID
>         query: {
>             where: "STATE = 'PA'",  // the where clause of the query
>             accuracy: 100           // the accuracy of the returned feature
>         }
>     }

options | {Object} Object with non-default properties to set on the layer. Supported properties are buffer, callback, scope, and any other properties applicable to the ArcXML format. Set the ‘callback’ and ‘scope’ for an object and function to recieve the parsed features from ArcIMS.

### clone

> clone: function ( | obj | )

Create a clone of this layer

#### Returns

{OpenLayers.Layer.ArcIMS} An exact clone of this layer

> getURL: function( | bounds | )

Return an image url this layer.

> getURLasync: function( | bounds,
> | callback,
> | scope | )

Get an image url this layer asynchronously, and execute a callback when the image url is generated.

> getUrlOrImage: function( | output | )

Extract a url or image from the ArcXML image output.

> setLayerQuery: function( | id,
> | querydef | )

Set the query definition on this layer.

> getFeatureInfo: function( | geometry,
> | layer,
> | options | )

Get feature information from ArcIMS.

> clone: function ( | obj | )

Create a clone of this layer
Create a new ArcIMS layer object.
Instances of this class represent bounding boxes.
This class represents a longitude and latitude pair
Polygon is a collection of Geometry.LinearRings.
Close