To create a new object, the user must choose the type (polygon, line or point) and than draw on the map. When the drawing is done, the user can save it by clicking on the save button. The object is then saved on the server like this:

POST request to a URL like /layers/<id-layers>. The cookies are transmitted. The request contains the drawing in the GeoJSON format. The server answers with the same GeoJSON with one key difference: the new object contains an id so the user can edit it.

To edit an object, the user need to click on it. Once this is done, the object switch to “edition mode”. The user can then modify it and the modifications are displayed over the original object with a lighter color (see screenshot below). Once the editing is done, the user must click on the save button. The object is then stored like this:

POST request to a URL like /layers/<id-layers>/<id-object>. The cookies are transmitted. The request contains the drawing in the GeoJSON format. The server answers with the same GeoJSON.

The layer is asked again to MapServer.

This display of the layer is updated.

The dialog to edit an object with GeoMapFish

The edition tools contains some advanced features like the possibility to subtract polygons.

3liz has a demo of layer edition. It relies on QGis Server and OpenLayers 2 through lizmap. QGis Server is configured as a WFS-T server and OpenLayers do the proper WFS requests when the user save his/her editions.