Use ol.object.assign() instead of goog.object.clone()
This commit is contained in:
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user