GeoExt

Table Of Contents

Previous topic

GeoExt.data.AttributeStore

Next topic

GeoExt.data.FeatureRecord

GeoExt.data.FeatureReader

Extends
class GeoExt.data.FeatureReader(meta, recordType)
Data reader class to create an array of GeoExt.data.FeatureRecord objects from an OpenLayers.Protocol.Response object for use in a GeoExt.data.FeatureStore object.

Example Use

Typical usage in a store:

var store = new Ext.data.Store({
    reader: new GeoExt.data.FeatureReader({}, [
        {name: 'name', type: 'string'},
        {name: 'elevation', type: 'float'}
    ])
});

Public Methods

Public methods in addition to those listed for Ext.data.DataReader.

FeatureReader.readRecords()
Parameter:featuresArray(OpenLayers.Feature.Vector) List of features for creating records
Returns:Object An object with records and totalRecords properties.

Create a data block containing GeoExt.data.FeatureRecord objects from an array of features.