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