adding a feature.modified property, making the ModifyFeature control set it and the WFST format check for it so only modified attributes and a modified geometry need to be included in an Update transaction. r=bartvde (closes #3400)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@12149 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -81,6 +81,42 @@ OpenLayers.Feature.Vector = OpenLayers.Class(OpenLayers.Feature, {
|
||||
* {String} rendering intent currently being used
|
||||
*/
|
||||
renderIntent: "default",
|
||||
|
||||
/**
|
||||
* APIProperty: modified
|
||||
* {Object} An object with the originals of the geometry and attributes of
|
||||
* the feature, if they were changed. Currently this property is only read
|
||||
* by <OpenLayers.Format.WFST.v1>, and written by
|
||||
* <OpenLayers.Control.ModifyFeature>, which sets the geometry property.
|
||||
* Applications can set the originals of modified attributes in the
|
||||
* attributes property. Note that applications have to check if this
|
||||
* object and the attributes property is already created before using it.
|
||||
* After a change made with ModifyFeature, this object could look like
|
||||
*
|
||||
* (code)
|
||||
* {
|
||||
* geometry: >Object
|
||||
* }
|
||||
* (end)
|
||||
*
|
||||
* When an application has made changes to feature attributes, it could
|
||||
* have set the attributes to something like this:
|
||||
*
|
||||
* (code)
|
||||
* {
|
||||
* attributes: {
|
||||
* myAttribute: "original"
|
||||
* }
|
||||
* }
|
||||
* (end)
|
||||
*
|
||||
* Note that <OpenLayers.Format.WFST.v1> only checks for truthy values in
|
||||
* *modified.geometry* and the attribute names in *modified.attributes*,
|
||||
* but it is recommended to set the original values (and not just true) as
|
||||
* attribute value, so applications could use this information to undo
|
||||
* changes.
|
||||
*/
|
||||
modified: null,
|
||||
|
||||
/**
|
||||
* Constructor: OpenLayers.Feature.Vector
|
||||
|
||||
Reference in New Issue
Block a user