Merge pull request #9622 from kekel87/master

Avoid mutating input in EsriJSON format
This commit is contained in:
Tim Schaub
2019-07-15 14:35:58 -07:00
committed by GitHub
2 changed files with 19 additions and 2 deletions

View File

@@ -256,10 +256,10 @@ function readGeometry(object, opt_options) {
const rings = convertRings(esriJSONPolygon.rings, layout);
if (rings.length === 1) {
type = GeometryType.POLYGON;
object['rings'] = rings[0];
object = Object.assign({}, object, {['rings']: rings[0]});
} else {
type = GeometryType.MULTI_POLYGON;
object['rings'] = rings;
object = Object.assign({}, object, {['rings']: rings});
}
}
const geometryReader = GEOMETRY_READERS[type];