# OpenLayers.Format.ArcXML

Read/Wite ArcXML. Create a new instance with the OpenLayers.Format.ArcXML constructor.

#### Inherits from

- <OpenLayers.Format>

Summary

OpenLayers.Format.ArcXML | Read/Wite ArcXML.
Properties |
fontStyleKeys | {Array} List of keys used in font styling.
request | A get_image request destined for an ArcIMS server.
response | A parsed response from an ArcIMS server.
Functions |
OpenLayers.Format.ArcXML | Create a new parser/writer for ArcXML.
parseEnvelope | Parse an array of coordinates into an ArcXML envelope structure.
addLayers | Add a collection of layers to another collection of layers.
addImageSize | Set the size of the requested image.
addBackground | Set background color and transparent color if defined
addCoordSys | Add the coordinate system information to an object.
parseResponse | Take an ArcXML response, and parse in into this object’s internal properties.
parseAttributes |
parsePointGeometry |

### Properties

### fontStyleKeys

{Array} List of keys used in font styling.

### request

A get_image request destined for an ArcIMS server.

### response

A parsed response from an ArcIMS server.

### Functions

### OpenLayers.Format.ArcXML

Create a new parser/writer for ArcXML. Create an instance of this class to begin authoring a request to an ArcIMS service. This is used primarily by the ArcIMS layer, but could be used to do other wild stuff, like geocoding.

#### Parameters

options | {Object} An optional object whose properties will be set on this instance.

### parseEnvelope

> parseEnvelope: function( | env,
> | arr | )

Parse an array of coordinates into an ArcXML envelope structure.

#### Parameters

env | {Object} An envelope object that will contain the parsed coordinates.
arr | {Array(double)} An array of coordinates in the order: [ minx, miny, maxx, maxy ]

### addLayers

> addLayers: function( | ll,
> | lyrs | )

Add a collection of layers to another collection of layers. Each layer in the list is tuple of { id, visible }. These layer collections represent the /ARCXML/REQUEST/get_image/PROPERTIES/LAYERLIST/LAYERDEF items in ArcXML

TODO: Add support for dynamic layer rendering.

#### Parameters

ll | {Array({id,visible})} A list of layer definitions.
lyrs | {Array({id,visible})} A list of layer definitions.

### addImageSize

> addImageSize: function( | imsize,
> | olsize | )

Set the size of the requested image.

#### Parameters

imsize | {Object} An ArcXML imagesize object.
olsize | {OpenLayers.Size} The image size to set.

### addBackground

> addBackground: function( | backgrnd,
> | olbackgrnd | )

Set background color and transparent color if defined

#### Parameters

backgrnd | {Object} ArcXML background object.
olbackgrnd | {Object} Background colors to set.

### addCoordSys

> addCoordSys: function( | featOrFilt,
> | fsys | )

Add the coordinate system information to an object. The object may be

#### Parameters

featOrFilt | {Object} A featurecoordsys or filtercoordsys ArcXML structure.
fsys | {String} or {OpenLayers.Projection} or {filtercoordsys} or {featurecoordsys} A projection representation. If it’s a {String}, the value is assumed to be the SRID. If it’s a {OpenLayers.Projection} AND Proj4js is available, the projection number and name are extracted from there. If it’s a filter or feature ArcXML structure, it is copied.

### parseResponse

> parseResponse: function( | data | )

Take an ArcXML response, and parse in into this object’s internal properties.

#### Parameters

data | {String} or {DOMElement} The ArcXML response, as either a string or the top level DOMElement of the response.

### parseAttributes

> parseAttributes: function( | node,
> | type | )

#### Parameters

node | {<DOMElement>} An element to parse attributes from.

#### Returns

{Object} An attributes object, with properties set to attribute values.

### parsePointGeometry

> parsePointGeometry: function( | node | )

#### Parameters

node | {<DOMElement>} An element to parse <COORDS> or <POINT> arcxml data from.

#### Returns

{OpenLayers.Geometry.LinearRing} A linear ring represented by the node’s points.

> parseEnvelope: function( | env,
> | arr | )

Parse an array of coordinates into an ArcXML envelope structure.

> addLayers: function( | ll,
> | lyrs | )

Add a collection of layers to another collection of layers.

> addImageSize: function( | imsize,
> | olsize | )

Set the size of the requested image.

> addBackground: function( | backgrnd,
> | olbackgrnd | )

Set background color and transparent color if defined

> addCoordSys: function( | featOrFilt,
> | fsys | )

Add the coordinate system information to an object.

> parseResponse: function( | data | )

Take an ArcXML response, and parse in into this object’s internal properties.

> parseAttributes: function( | node,
> | type | )

> parsePointGeometry: function( | node | )

Create a new parser/writer for ArcXML.