Heron.widgets.search.SearchByDrawPanel
¶
-
class
Heron.widgets.search.
SearchByDrawPanel
(config)¶
A Panel to hold a spatial (WFS) query by drawing geometries.
Example Use¶
This Panel is mostly used in combination with the Heron.widgets.search.FeaturePanel in which results from a search are displayed in a grid and on the Map. Both Panels are usually bundled in a Heron.widgets.search.SearchCenterPanel that manages the search and result Panels. See config example below.
{
xtype: 'hr_searchcenterpanel',
hropts: {
searchPanel: {
xtype: 'hr_searchbydrawpanel',
id: 'hr-searchbydrawpanel',
header: false,
border: false,
style: {
fontFamily: 'Verdana, Arial, Helvetica, sans-serif',
fontSize: '12px'
}
},
resultPanel: {
xtype: 'hr_featuregridpanel',
id: 'hr-featuregridpanel',
header: false,
border: false,
autoConfig: true,
exportFormats: ['XLS', 'WellKnownText'],
hropts: {
zoomOnRowDoubleClick: true,
zoomOnFeatureSelect: false,
zoomLevelPointSelect: 8,
zoomToDataExtent: false
}
}
}
A SearchCenterPanel
can be embedded in a Toolbar item popup as toolbar definition item searchcenter
as below. Heron.examples.searchPanelConfig
is the SearchCenterPanel
config as above.
{
type: "searchcenter",
// Options for SearchPanel window
options: {
show: true,
searchWindow: {
title: __('Search by Drawing'),
x: 100,
y: undefined,
width: 360,
height: 400,
items: [
Heron.examples.searchPanelConfig
]
}
}
}
Config Options¶
Configuration properties in addition to those listed for Heron.widgets.search.SpatialSearchPanel.
-
name
String
Name, e.g. for multiple searches combo.
-
spatialFilterType
String
A valid value from the OpenLayers.Filter.Spatial.* enum like OpenLayers.Filter.Spatial.WITHIN Used in the WFS request Spatial Filter. Default is: OpenLayers.Filter.Spatial.INTERSECTS
Public Methods¶
Public methods in addition to those listed for Heron.widgets.search.SpatialSearchPanel.
-
SearchByDrawPanel.
onDrawingComplete
()¶ Called when feature drawn selected.
-
SearchByDrawPanel.
onPanelRendered
()¶ Called when Panel has been rendered.
-
SearchByDrawPanel.
onParentHide
()¶ Called when parent Panel is hidden in Container.
-
SearchByDrawPanel.
onParentShow
()¶ Called when parent Panel is shown in Container.
-
SearchByDrawPanel.
searchFromFeatures
()¶ Issue spatial search via WFS.