1
|
/* Copyright (c) 2006-2013 by OpenLayers Contributors (see authors.txt for
|
2
|
* full list of contributors). Published under the 2-clause BSD license.
|
3
|
* See license.txt in the OpenLayers distribution or repository for the
|
4
|
* full text of the license. */
|
5
|
|
6
|
/**
|
7
|
* @requires OpenLayers/Format/ArcXML.js
|
8
|
*/
|
9
|
|
10
|
/**
|
11
|
* Class: OpenLayers.Format.ArcXML.Features
|
12
|
* Read/Write ArcXML features. Create a new instance with the
|
13
|
* <OpenLayers.Format.ArcXML.Features> constructor.
|
14
|
*
|
15
|
* Inherits from:
|
16
|
* - <OpenLayers.Format.XML>
|
17
|
*/
|
18
|
OpenLayers.Format.ArcXML.Features = OpenLayers.Class(OpenLayers.Format.XML, {
|
19
|
|
20
|
/**
|
21
|
* Constructor: OpenLayers.Format.ArcXML.Features
|
22
|
* Create a new parser/writer for ArcXML Features. Create an instance of this class
|
23
|
* to get a set of features from an ArcXML response.
|
24
|
*
|
25
|
* Parameters:
|
26
|
* options - {Object} An optional object whose properties will be set on
|
27
|
* this instance.
|
28
|
*/
|
29
|
|
30
|
/**
|
31
|
* APIMethod: read
|
32
|
* Read data from a string of ArcXML, and return a set of OpenLayers features.
|
33
|
*
|
34
|
* Parameters:
|
35
|
* data - {String} or {DOMElement} data to read/parse.
|
36
|
*
|
37
|
* Returns:
|
38
|
* {Array(<OpenLayers.Feature.Vector>)} A collection of features.
|
39
|
*/
|
40
|
read: function(data) {
|
41
|
var axl = new OpenLayers.Format.ArcXML();
|
42
|
var parsed = axl.read(data);
|
43
|
|
44
|
return parsed.features.feature;
|
45
|
}
|
46
|
});
|