cgxp.plugins.FeatureGrid

ptype
cgxp_featuregrid
class cgxp.plugins.FeatureGrid(config)

A plugin that adds a grid panel for displaying feature information (one feature per row).

This plugin is used to display results from query plugins such as cgxp.plugins.WMSGetFeatureInfo, and cgxp.plugins.QueryBuilder.

Example Use

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

var obs = new Ext.util.Observable();

new gxp.Viewer({
    ...
    tools: [{
        ptype: "cgxp_featuregrid",
        id: "featureGrid",
        csvURL: "${request.route_url('csvecho')}",
        maxFeatures: 200,
        outputTarget: "featuregrid-container",
        events: EVENTS
    }, {
        ptype: "cgxp_wmsgetfeatureinfo",
        actionTarget: "center.tbar",
        toggleGroup: "maptools",
        events: EVENTS
    }]
    ...
});

Config Options

Configuration properties.

actionsText

String Text for the “actions on selected results” button (i18n).

autoSelectFirst

Boolean If true, the first row of every result grid is automatically selected. Default is true.

clearAllText

String Text for the “clear all results” button (i18n).

csvSelectionExportText

String Text for the “export as csv” menu item (i18n).

csvSeparator

String Specifies the separator character for the exported CSV docs. Default is ‘,’ (comma).

events

Ext.util.Observable An Ext.util.Observable instance used to receive events from other plugins.

  • queryopen: sent on open query tool.
  • queryclose: sent on closequery tool.
  • querystarts: sent when the query button is pressed
  • queryresults(features): sent when the result is received
globalSelection

Boolean If true, selection state are remembered across all result tabs when switching tab. Also the “select all”, “select none” and “toggle” buttons act on all tabs and not only the active tab. This also enable global result in export pdf. Default is false.

maxFeaturesText

String Text for the “reached max number of features” label (i18n).

messageStyle

String CSS style used for the queryResult message.

pointRecenterZoom

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

quote

String Specifies the character to delimit strings in the exported CSV docs. Default is ‘”’ (double quote).

resultsText

String Text for the “number of result” label (plural) (i18n).

resultText

String Text for the “number of result” label (singular) (i18n).

selectAllText

String Text for the “select all results” menu item (i18n).

selectNoneText

String Text for the “select none” menu item (i18n).

selectText

String Text for the “select results” button (i18n).

selectToggleText

String Text for the “toggle selection” menu item (i18n).

showUnqueriedLayers

Bool show or hide the unqueried layers in the tabpanel, default is true.

suggestionText

String Text for the shortened notice message (i18n).

zoomToSelectionText

String Text for the “zoom to selection” menu item (i18n).

Table Of Contents

Previous topic

cgxp.plugins.Editing

Next topic

cgxp.plugins.FeaturesGrid

This Page