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 in addition to those listed for Ext.data.DataReader.
Parameter: | layers – Array(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.