Use ol.object.assign() instead of goog.object.clone()

This commit is contained in:
Tim Schaub
2016-02-03 07:22:39 -07:00
parent 619e070d80
commit a74af66d5f
13 changed files with 34 additions and 28 deletions
+3 -2
View File
@@ -9,6 +9,7 @@ goog.require('ol.format.GMLBase');
goog.require('ol.format.XMLFeature');
goog.require('ol.format.XSD');
goog.require('ol.geom.Geometry');
goog.require('ol.object');
goog.require('ol.proj');
goog.require('ol.xml');
@@ -543,7 +544,7 @@ ol.format.WFS.writeQuery_ = function(node, featureType, objectStack) {
ol.xml.setAttributeNS(node, ol.format.WFS.XMLNS, 'xmlns:' + featurePrefix,
featureNS);
}
var item = goog.object.clone(context);
var item = ol.object.assign({}, context);
item.node = node;
ol.xml.pushSerializeAndPop(item,
ol.format.WFS.QUERY_SERIALIZERS_,
@@ -610,7 +611,7 @@ ol.format.WFS.GETFEATURE_SERIALIZERS_ = {
ol.format.WFS.writeGetFeature_ = function(node, featureTypes, objectStack) {
var context = objectStack[objectStack.length - 1];
goog.asserts.assert(goog.isObject(context), 'context should be an Object');
var item = goog.object.clone(context);
var item = ol.object.assign({}, context);
item.node = node;
ol.xml.pushSerializeAndPop(item,
ol.format.WFS.GETFEATURE_SERIALIZERS_,