Heron

Table Of Contents

Previous topic

Heron.widgets.OpenLSSearchCombo

Next topic

Heron.widgets.ToolbarBuilder

Heron.widgets.SearchPanel

Extends
xtype
hr_searchpanel
class Heron.widgets.SearchPanel(config)

A panel designed to hold a (geo-)search form.

Example Use

Sample code showing how to configure a Heron SearchPanel. This example uses the internal default progress messages and action (zoom).

 {
        xtype: 'hr_searchpanel',
        id: 'hr-searchpanel',
        title: __('Search'),
        bodyStyle: 'padding: 6px',
        style: {
                fontFamily: 'Verdana, Arial, Helvetica, sans-serif',
                fontSize: '12px'
        },
        protocol: new OpenLayers.Protocol.WFS({
                                version: "1.1.0",
                                url: "http://gis.kademo.nl/gs2/wfs?",
                                srsName: "EPSG:28992",
                                featureType: "hockeyclubs",
                                featureNS: "http://innovatie.kadaster.nl"
                        }),
        items: [
                {
                        xtype: "textfield",
                        name: "name__like",
                        value: 'Hu*',
                        fieldLabel: "  name"
                },
                {
                        xtype: "label",
                        id: "helplabel",
                        html: 'Type name of an NL hockeyclub, use * as wildcard<br/>',
                        style: {
                                fontSize: '10px',
                                color: '#CCCCCC'
                        }
                }
        ],
        hropts: {
                onSearchCompleteZoom : 11
        }
}

Config Options

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

onSearchComplete

Function to call when search is complete. Default is to show “Search completed” with feature count on progress label.

onSearchCompleteAction

Function to call to perform action when search is complete. Either zoom to single Point feature or zoom to extent (bbox) of multiple features

onSearchCompleteZoom

Zoomlevel to zoom into when feature(s) found and panned to feature. default value is 11.

onSearchInProgress

Function to call when search is starting. Default is to show “Searching...” on progress label.