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

View File

@@ -17,6 +17,7 @@ goog.require('ol.geom.MultiPolygon');
goog.require('ol.geom.Point');
goog.require('ol.geom.Polygon');
goog.require('ol.geom.flat.orient');
goog.require('ol.object');
goog.require('ol.proj');
@@ -70,7 +71,7 @@ ol.format.EsriJSON.readGeometry_ = function(object, opt_options) {
} else if (object.rings) {
var layout = ol.format.EsriJSON.getGeometryLayout_(object);
var rings = ol.format.EsriJSON.convertRings_(object.rings, layout);
object = /** @type {EsriJSONGeometry} */(goog.object.clone(object));
object = /** @type {EsriJSONGeometry} */(ol.object.assign({}, object));
if (rings.length === 1) {
type = ol.geom.GeometryType.POLYGON;
object.rings = rings[0];