cgxp.plugins.FullTextSearch

ptype
cgxp_fulltextsearch
class cgxp.plugins.FullTextSearch(config)

Plugin to add a text search field.

Example Use

Sample code showing how to add a FullTextSearch plugin to a gxp.Viewer:

new gxp.Viewer({
    ...
    tools: [{
        ptype: "cgxp_fulltextsearch",
        url: "${request.route_url('fulltextsearch', path='')}",
        actionTarget: "center.tbar"
    }]
    ...
});

Config Options

Configuration properties.

actionConfig

Object Optional configuration of the ComboBox.

comboWidth

Integer Width in pixels of the search combobox.

coordsRecenteringStyle

Object Style configuration used when recentering on coordinates.

coordsRecenterZoom

Number Zoom level to use when recentering on coordinates (optional).

emptyText

String Text to use when the field is empty (i18n).

grouping

Boolean Tells whether to group the results by layer_name. If set to true, the data returned by the service is intended to include such a field. If set to true, GroupComboBox.js needs to be included as part of the built file if any. Defaults to false.

layerTreeId

String Id of the layertree tool. If set, automaticaly load the corresponding layerGroup in the layer tree.

limits

Object Option object to configure search limit parameters sent to the text search service. The possible properties are:

  • limit - Number The maximum number of results in the response.
  • partitionlimit - Number The maximum number of results per layer/group in the response.

partitionlimit is typically used when the grouping option is to true, to limit the number of results in each group.

If the limits option is unspecified the limit parameters sent in search requests depend whether grouping is true or false:

  • If grouping is false then limit is set to 20, and partitionlimit is not set.
  • If grouping is true then limit is set to 40, and partitionlimit is set to 10.

Any provided limits object is applied to the default values. For example, if grouping is true and if the limits option is set to {limit: 50} then limit will be set to 50 and partitionlimit will be set to 10 in search requests.

loadingText

String Text to display while loading results (i18n).

pointRecenterZoom

Number Zoom level to use when recentering on point items (optional).

projectionCodes

Array List of EPSG codes of projections that should be used when trying to recenter on coordinates. Leftmost projections are used preferably. Default is current map projection.

showCenter

Boolean f true, center point is materialized when centering on coordinates default is false).

tooltip

Boolean Whether to display a tooltip above the search box. Default is true.

tooltipTitle

String Text for the tooltip title (i18n). Only applies if tooltip is true.

url

String URL of the text search service. Typically set to "${request.route_url('fulltextsearch', path='')}".

vectorLayerConfig

Object Optional configuration of the vector layer.

Table Of Contents

Previous topic

cgxp.plugins.FloorSlider

Next topic

cgxp.plugins.Geonames

This Page