mapfish. widgets. data. FeatureReader

FeatureReader is a specific Ext.data.DataReader.  When records are added to the store using this reader, specific fields like feature, state and fid are available.

Deprecated

This widget is deprecated and will be removed in next mapfish version.  Please use http://geoext.org- /lib- /GeoExt- /data- /FeatureReader.html instead.

Typical usage in a store

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

Inherits from

  • {Ext.data.DataReader}
Summary
mapfish. widgets. data. FeatureReaderFeatureReader is a specific Ext.data.DataReader.
Constructor
mapfish. widgets. data. FeatureReaderCreate a feature reader.
Properties
totalRecords{Integer}
Functions
readThis method is only used by a DataProxy which has retrieved data.
readRecordsCreate a data block containing Ext.data.Records from an array of features.

Constructor

mapfish. widgets. data. FeatureReader

Create a feature reader.  The arguments passed are similar to those passed to {Ext.data.DataReader} constructor.

Properties

totalRecords

{Integer}

Functions

read

read: function(response)

This method is only used by a DataProxy which has retrieved data.

Parameters

response{OpenLayers.Protocol.Response}

Returns

{Object} An object with two properties.  The value of the property “records” is the array of records corresponding to the features.  The value of the property “totalRecords” is the number of records in the array.

readRecords

readRecords : function(features)

Create a data block containing Ext.data.Records from an array of features.

Parameters

features{Array{OpenLayers.Feature.Vector}}

Returns

{Object} An object with two properties.  The value of the property “records” is the array of records corresponding to the features.  The value of the property “totalRecords” is the number of records in the array.

read: function(response)
This method is only used by a DataProxy which has retrieved data.
readRecords : function(features)
Create a data block containing Ext.data.Records from an array of features.
Protocols return Response objects to their users.
Vector features use the OpenLayers.Geometry classes as geometry description.
Close