Heron

Table Of Contents

Previous topic

Heron.widgets.CoordSearchPanel

Next topic

Heron.widgets.FeatSelSearchPanel

Heron.widgets.FeatSelGridPanel

Extends
xtype
hr_featselgridpanel
class Heron.widgets.FeatSelGridPanel(config)

Show features both in a grid and on the map and have them selectable.

Example Use

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(); );

Config Options

Configuration properties in addition to those listed for GeoExt.form.FormPanel.

separateSelectionLayer

Boolean Should selected features be managed in separate overlay Layer (handy for printing) ?.

zoomLevelPointSelect

Boolean Zoom level for point features when selected, default 10.

zoomOnFeatureSelect

Boolean Zoom to feature (extent) when selected ?.

zoomOnRowDoubleClick

Boolean Zoom to feature (extent) when row is double clicked ?.

Public Methods

Public methods in addition to those listed for GeoExt.form.FormPanel.

FeatSelGridPanel.hideLayer()

Hide the layer with features on the map.

FeatSelGridPanel.loadFeatures()

Loads array of feature objects in store and shows them on grid and map.

FeatSelGridPanel.removeFeatures()

Removes all feature objects from store .

FeatSelGridPanel.showLayer()

Show the layer with features on the map.