Sample code to create a feature grid with a feature selection model:
var gridPanel = new Ext.grid.GridPanel({
title: "Feature Grid",
region: "east",
store: store,
width: 320,
columns: [{
header: "Name",
width: 200,
dataIndex: "name"
}, {
header: "Elevation",
width: 100,
dataIndex: "elevation"
}],
sm: new GeoExt.grid.FeatureSelectionModel()
});
Configuration properties in addition to those listed for Ext.grid.RowSelectionModel.
Public methods in addition to those listed for Ext.grid.RowSelectionModel.
Parameters: |
|
---|---|
Returns: | OpenLayers.Control.SelectFeature The select feature control this selection model uses. |
Bind the selection model to a layer or a SelectFeature control.
Returns: | OpenLayers.Bounds or null if the layer has no features with geometries |
---|
Calculates the max extent which includes all selected features.
Returns: | OpenLayers.Control.SelectFeature The select feature control this selection model used. |
---|
Unbind the selection model from the layer or SelectFeature control.