Show features both in a grid and on the map and have them selectable.
Sample code showing how to configure a Heron FeatSelGridPanel. In this case a popup ExtJS Window is created with a single FeatSelGridPanel (xtype: ‘hr_featselgridpanel’).
xt.onReady(function() { / create a panel and add the map panel and grid panel / inside it ew Ext.Window({ itle: __(‘Click Map or Grid to Select - Double Click to Zoom to feature’), ayout: “fit”, : 50, : 100, eight: 400, idth: 280, tems: [
{
type: ‘hr_featselgridpanel’, d: ‘hr-featselgridpanel’, itle: __(‘Parcels’), eader: false, olumns: [
{
eader: “Fid”, idth: 60, ataIndex: “id”, ype: ‘string’ ,
{
eader: “ObjectNum”, idth: 180, ataIndex: “objectnumm”, ype: ‘string’
}
, ropts: { toreOpts: { roxy: new GeoExt.data.ProtocolProxy({ rotocol: new OpenLayers.Protocol.HTTP({ rl: ‘data/parcels.json’, ormat: new OpenLayers.Format.GeoJSON() ) ), utoLoad: true , oomOnRowDoubleClick : true, oomOnFeatureSelect : false, oomLevelPointSelect : 8, eparateSelectionLayer: true
]
).show(); );
Configuration properties in addition to those listed for GeoExt.form.FormPanel.
Boolean Should selected features be managed in separate overlay Layer (handy for printing) ?.
Boolean Zoom level for point features when selected, default 10.
Boolean Zoom to feature (extent) when selected ?.
Boolean Zoom to feature (extent) when row is double clicked ?.
Public methods in addition to those listed for GeoExt.form.FormPanel.
Hide the layer with features on the map.
Loads array of feature objects in store and shows them on grid and map.
Removes all feature objects from store .
Show the layer with features on the map.