cgxp.plugins.QueryBuilder

ptype
cgxp_querier
class cgxp.plugins.QueryBuilder(config)

Example Use

Sample code showing how to add a QueryBuilder plugin to a gxp.Viewer, only for logged users:

...
Ext.namespace("cgxp");
// WFS namespace, depends of the backend used, default is for Mapserver
cgxp.WFS_FEATURE_NS = "http://mapserver.gis.umn.edu/mapserver";

...
new gxp.Viewer({
    ...
    tools: [
% if user:
    {
        ptype: 'cgxp_querier',
        outputTarget: "left-panel",
        events: EVENTS,
        mapserverproxyURL: "${request.route_url('mapserverproxy', path='')}",
        // don't work with actual version of mapserver, the proxy will limit to 200
        // it is intended to be reactivated this once mapserver is fixed
        srsName: 'EPSG:21781',
        featureTypes: ['layer1', 'layer2'],
        attributeURLs: { 'layer1': { 'fieldA': 'http://path/to/json' }},
        describeFeatureTypeParams: ${dumps(url_role_params) | n}
    }
% endif
    ]
    ...
});

Config Options

Configuration properties.

attributeURLs

Object Optional list of URL to feed combos for given fields for given layer.

describeFeatureTypeParams

Object Optional additional params given to DescribeFeatureType request

events

Ext.util.Observable

featureTypes

Array(String) The name of the mapserver layers

layerText

String Label for the layer chooser (i18n)

mapserverproxyURL

String url of the mapserver proxy

matchCase

Boolean the matchCase WFS/GetFeature query argument.

maxFeatures

Integer Limit of features returned by mapserver. Default is 200.

options

Json Object parameters for the panel

querierText

String Title for the panel (i18n)

srid

String projection EPSG code, for example EPSG:21781

Table Of Contents

Previous topic

<no title>

Next topic

API

This Page