source:
trunk/workshop-routing-foss4g/web/OpenLayers/lib/OpenLayers/Format/ArcXML/Features.js
@
76
Revision 76, 1.5 KB checked in by djay, 12 years ago (diff) | |
---|---|
|
Rev | Line | |
---|---|---|
[76] | 1 | /* Copyright (c) 2006-2010 by OpenLayers Contributors (see authors.txt for |
2 | * full list of contributors). Published under the Clear BSD license. | |
3 | * See http://svn.openlayers.org/trunk/openlayers/license.txt 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/Wite 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 | initialize: function(options) { | |
30 | OpenLayers.Format.XML.prototype.initialize.apply(this, [options]); | |
31 | }, | |
32 | ||
33 | /** | |
34 | * APIMethod: read | |
35 | * Read data from a string of ArcXML, and return a set of OpenLayers features. | |
36 | * | |
37 | * Parameters: | |
38 | * data - {String} or {DOMElement} data to read/parse. | |
39 | * | |
40 | * Returns: | |
41 | * {Array(<OpenLayers.Feature.Vector>)} A collection of features. | |
42 | */ | |
43 | read: function(data) { | |
44 | var axl = new OpenLayers.Format.ArcXML(); | |
45 | var parsed = axl.read(data); | |
46 | ||
47 | return parsed.features.feature; | |
48 | } | |
49 | }); |
Note: See TracBrowser
for help on using the repository browser.