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