source:
trunk/workshop-routing-foss4g/web/GeoExt/docs/_sources/lib/GeoExt/data/FeatureReader.txt
@
76
Revision 76, 1.3 KB checked in by djay, 12 years ago (diff) | |
---|---|
|
Rev | Line | |
---|---|---|
[76] | 1 | |
2 | .. currentmodule:: GeoExt.data | |
3 | ||
4 | :class:`GeoExt.data.FeatureReader` | |
5 | ================================================================================ | |
6 | ||
7 | ||
8 | .. cssclass:: meta | |
9 | ||
10 | ||
11 | Extends | |
12 | * `Ext.data.DataReader <http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.DataReader>`_ | |
13 | ||
14 | ||
15 | ||
16 | ||
17 | ||
18 | ||
19 | ||
20 | .. class:: FeatureReader(meta, recordType) | |
21 | ||
22 | Data reader class to create an array of | |
23 | :class:`GeoExt.data.FeatureRecord` objects from an | |
24 | ``OpenLayers.Protocol.Response`` object for use in a | |
25 | :class:`GeoExt.data.FeatureStore` object. | |
26 | ||
27 | ||
28 | ||
29 | Example Use | |
30 | ----------- | |
31 | ||
32 | Typical usage in a store: | |
33 | ||
34 | .. code-block:: javascript | |
35 | ||
36 | var store = new Ext.data.Store({ | |
37 | reader: new GeoExt.data.FeatureReader({}, [ | |
38 | {name: 'name', type: 'string'}, | |
39 | {name: 'elevation', type: 'float'} | |
40 | ]) | |
41 | }); | |
42 | ||
43 | ||
44 | ||
45 | ||
46 | ||
47 | ||
48 | ||
49 | ||
50 | ||
51 | Public Methods | |
52 | -------------- | |
53 | ||
54 | Public methods in addition to those | |
55 | listed for `Ext.data.DataReader <http://dev.sencha.com/deploy/dev/docs/?class=Ext.data.DataReader>`_. | |
56 | ||
57 | ||
58 | .. method:: FeatureReader.readRecords | |
59 | ||
60 | :param features: ``Array(OpenLayers.Feature.Vector)`` List of | |
61 | features for creating records | |
62 | :return: ``Object`` An object with ``records`` and ``totalRecords`` | |
63 | properties. | |
64 | ||
65 | Create a data block containing :class:`GeoExt.data.FeatureRecord` | |
66 | objects from an array of features. | |
67 | ||
68 | ||
69 | ||
70 | ||
71 |
Note: See TracBrowser
for help on using the repository browser.