GeoExt

Table Of Contents

Previous topic

GeoExt.data.FeatureStore

Next topic

GeoExt.data.LayerRecord

GeoExt.data.LayerReader

Extends
class GeoExt.data.LayerReader(meta, recordType)
Data reader class to create an array of GeoExt.data.LayerRecord objects from an array of OpenLayers.Layer objects for use in a GeoExt.data.LayerStore object.

Example Use

Sample using a reader to create records from an array of layers:

var reader = new GeoExt.data.LayerReader();
var layerData = reader.readRecords(map.layers);
var numRecords = layerData.totalRecords;
var layerRecords = layerData.records;

Public Methods

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

LayerReader.readRecords()
Parameter:layersArray(OpenLayers.Layer) List of layers for creating records.
Returns:Object An object with records and totalRecords properties.

From an array of OpenLayers.Layer objects create a data block containing GeoExt.data.LayerRecord objects.