A panel designed to hold a (geo-)search form plus results (features) in grid and on map. Combines both the FeatureGridPanel and SearchPanel widgets
Sample code showing how to configure a Heron SearchCenterPanel. Note that the config here contains both a Heron FormSearchPanel object (search form) and a Heron FeatureGridPanel (result panel). Other possible SearchPanels to use are: SpatialSearchPanel and GXP_QueryPanel.
{
xtype: 'hr_searchcenterpanel',
id: 'hr-searchcenterpanel',
title: __('Search'),
hropts: {
searchPanel: {
xtype: 'hr_formsearchpanel',
id: 'hr-formsearchpanel',
header: false,
bodyStyle: 'padding: 6px',
style: {
fontFamily: 'Verdana, Arial, Helvetica, sans-serif',
fontSize: '12px'
},
protocol: new OpenLayers.Protocol.WFS({
version: "1.1.0",
url: "http://kademo.nl/gs2/wfs?",
srsName: "EPSG:28992",
featureType: "hockeyclubs",
featureNS: "http://innovatie.kadaster.nl"
}),
items: [
{
xtype: "textfield",
name: "name__like",
value: 'H.C*',
fieldLabel: " name"
},
{
xtype: "label",
id: "helplabel",
html: 'Type name of an NL hockeyclub, use * as wildcard<br/>',
style: {
fontSize: '10px',
color: '#AAAAAA'
}
}
],
hropts: {
onSearchCompleteZoom : 11
}
},
resultPanel: {
xtype: 'hr_featuregridpanel',
id: 'hr-featuregridpanel',
title: __('Search'),
header: false,
columns: [
{
header: "Name",
width: 100,
dataIndex: "name",
type: 'string'
},
{
header: "Desc",
width: 200,
dataIndex: "cmt",
type: 'string'
}
],
hropts: {
zoomOnRowDoubleClick : true,
zoomOnFeatureSelect : true,
zoomLevelPointSelect : 8
}
}
}
}