Remove original handling on ol.Feature
This is another attempt to bring master closer to the vector-api branch. In anticipation of the ability to keep track of modifications on ol.Object through a beforechange event (d7e4be0), we will be able to manage originals on the application level or in a separate component outside of ol.Feature.
This commit is contained in:
@@ -157,17 +157,12 @@ ol.parser.ogc.WFS_v1 = function(opt_options) {
|
||||
}
|
||||
|
||||
// add in fields
|
||||
var original = feature.getOriginal();
|
||||
var originalAttributes = goog.isNull(original) ?
|
||||
undefined : original.getAttributes();
|
||||
var attributes = feature.getAttributes();
|
||||
var attribute;
|
||||
for (var key in attributes) {
|
||||
attribute = attributes[key];
|
||||
// TODO Only add geometries whose values have changed
|
||||
if (goog.isDef(attribute) && (attribute instanceof ol.geom.Geometry ||
|
||||
(!goog.isDef(originalAttributes) ||
|
||||
attribute != originalAttributes[key]))) {
|
||||
if (goog.isDef(attribute)) {
|
||||
this.writeNode('Property', {name: key, value: attribute}, null, node);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user