A panel designed to hold a (geo-)search form plus results (features) in grid and on map. Combines both the FeatSelGridPanel and SearchPanel widgets
Sample code showing how to configure a Heron FeatSelSearchPanel. Note that the config contains both a Heron SearchPanel object (search form) and a Heron FeatSelGridPanel (result panel).
{
xtype: 'hr_featselsearchpanel',
id: 'hr-featselsearchpanel',
title: __('Search'),
hropts: {
searchPanel: {
xtype: 'hr_searchpanel',
id: 'hr-searchpanel',
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_featselgridpanel',
id: 'hr-featselgridpanel',
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
}
}
}
}