cgxp.plugins.Editing

ptype
cgxp_editing
class cgxp.plugins.Editing(config)

Plugin to add an editing tool to the map.

This plugin works with the c2cgeoportal “layers” web service. It requires a cgxp.plugins.LayerTree plugin in the viewer.

Example Use

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

new gxp.Viewer({
    ...
    tools: [{
        ptype: 'cgxp_editing',
        layerTreeId: 'layertree',
        layersURL: "${request.route_url('layers_root')}"
    }, {
        ptype: "cgxp_layertree",
        id: "layertree",
        outputConfig: {
            ...
        },
        outputTarget: 'left-panel'
    }]
    ...
});

Config Options

Configuration properties.

createBtnText

String The text for the create button (i18n).

forbiddenText

String The text displayed when not allowed action is done (i18n).

helpText

String The text to the top of the editing window (i18n).

layerMenuText

String The text to the top of the layer menu (displayed when the create button is pressed) (i18n).

layersURL

String URL to the layers web service. Typically set to "${request.route_url('layers_root')}".

layerTreeId

String Id of the layertree tool.

Table Of Contents

Previous topic

cgxp.plugins.Disclaimer

Next topic

cgxp.plugins.FeatureGrid

This Page