This example shows how to modify and delete features available through WMS and WFS-T, whith
minimum overload on server.
-
When just viewing, OpenLayers works with WMS layer.
-
Modifying
-
When you click on the 'Modify' button and select a feature from the map by clicking on it,
OpenLayers will retrieve only that feature using the getFeature from WFS protocol
(and thanks to the OpenLayers.Protocol.WFS.fromWMSLayer protocol).
-
If at any time you want to cancel the modification, just click the 'Cancel' button
(I know, non-sense icon, sorry about that)
-
When you click on the 'Save' button, the feature is saved remotely through the
WFS-T protocol, and again only the modified feature is sent in the request.
-
Deleting
-
When you click on the 'Delete' button and select the feature you want to delete,
again, only the feature you want to delete will be retrieved.
-
If you confirm the dialog, a wfs:delete transaction will be sent to the server,
including, again, only the featureId of the deleted feature.