WFSTFeatureEditing ux

This widget automatically creates all the tools required to accomplish WFST editing using GeoExt. See WFSTFeatureEditing.js for the source code of this example.


Most of the components are created asynchronously using WFS requests. A GetCapabilities request is used to create the vector layers and a DescribeFeatureType one is used to get the fields and the geometry type. From there, DrawFeature, SelectFeature and many other controls and widgets are automatically created for each layer.

Only one layer can be edited at a time in one of the following mode : draw or edit.

The 'edit' mode can either use a 'filter' mode or not. This demo uses the filter mode. Enabling the 'edit' mode on a layer doesn't show the features yet. You need to draw a box on the map to get the features first, then click on the feature you wish to edit. You can also select it from the grid on the left of the window that pops up when you select a feature. If only one feature was returned by box you drawn, it's automatically selected. The "Return to selection" button clears the features that were returned by the box and reenable the box selection.

While creating vector layers with a WFS protocol, if a WMS layer having the same name present in the map, it will be automatically refreshed upon each modifications and also automatically shown when editing is enabled on its WFS counterpart. These features are shown in this demo.

The widget has an 'ignoreAttributes' property that can be set to a list of fields we don't want to be displayed in both grids. This feature is shown in this demo some user-specific fields are not shown in both grids.

The demo also available in French.

External components used

Here's the list of components that are not in GeoExt that are used by this widget.