Heron

Table Of Contents

Previous topic

Heron.widgets.CoordSearchPanel

Next topic

Heron.widgets.FeatureInfoPanel

Heron.widgets.FeatureGridPanel

Extends
xtype
hr_featuregridpanel
class Heron.widgets.FeatureGridPanel(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 FeatureGridPanel. In this case a popup ExtJS Window is created with a single FeatureGridPanel (xtype: ‘hr_featuregridpanel’).

xt.onReady(function() {
// create a panel and add the map panel and grid panel // inside it new Ext.Window({ title: __(‘Click Map or Grid to Select - Double Click to Zoom to feature’), layout: “fit”, x: 50, y: 100, height: 400, width: 280, items: [ { xtype: ‘hr_featuregridpanel’, id: ‘hr-featuregridpanel’, title: __(‘Parcels’), header: false, columns: [ { header: “Fid”, width: 60, dataIndex: “id”, type: ‘string’ }, { header: “ObjectNum”, width: 180, dataIndex: “objectnumm”, type: ‘string’ } ], hropts: { storeOpts: { proxy: new GeoExt.data.ProtocolProxy({ protocol: new OpenLayers.Protocol.HTTP({ url: ‘data/parcels.json’, format: new OpenLayers.Format.GeoJSON() }) }), autoLoad: true }, zoomOnRowDoubleClick : true, zoomOnFeatureSelect : false, zoomLevelPointSelect : 8, separateSelectionLayer: true } } ] }).show(); });

Config Options

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

autoConfig

Boolean Should the store and grid columns autoconfigure from loaded features?.

columnCapitalize

Boolean Should the column names be capitalized when autoconfig is true?

downloadable

Boolean Should the features in the grid be downloadble? Download can be effected in 3 ways: 1. via Grid export (CSV and XLS only) 2. downloading the original feature format (GML2) 3. (GeoServer only) requesting the server for a triggered download (all Geoserver WFS formats)

exportConfigs

Object The supported configs for formatting and exporting feature data. Actual presented download options are configured with exportFormats.

exportFormats

String Array

rray of document formats to be used when exporting the content of a GFI response. This requires the server-side CGI script heron.cgi` to be installed. Exporting results in a download of a document with the contents of the (Grid) Panel. or example when ‘XLS’ is configured, exporting will result in the Excel (or compatible) program to be tarted with the GFI data in an Excel worksheet. ption values are ‘CSV’ and/or ‘XLS’, default is, null, meaning no export (results in no export menu). he value [‘CSV’, ‘XLS’] configures a menu to choose from a .csv or .xls export document format.

separateSelectionLayer

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

vectorLayerOptions

Object Options to be passed on Vector constructors.

zoomLevelPoint

Integer Zoom level when layer is single point feature, default 10.

zoomLevelPointSelect

Integer 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 ?.

zoomToDataExtent

Boolean Zoom to layer data extent when loaded ?.

Public Methods

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

FeatureGridPanel.hideLayer()

Hide the layer with features on the map.

FeatureGridPanel.loadFeatures()

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

FeatureGridPanel.onPanelRendered()

Called when Panel has been rendered.

FeatureGridPanel.removeFeatures()

Removes all feature objects from store .

FeatureGridPanel.showLayer()

Show the layer with features on the map.