Polygon

constructor(mutableParts: Iterable<MutablePart>)

Constructs a Polygon with the given collection of MutableParts.

The spatial reference of the polygon will be either the spatial reference of the first part or null if there are no parts.

Since

200.1.0

Parameters

mutableParts

the parts with which to create the polygon. All parts must have the same spatial reference.


constructor(points: Iterable<Point>, spatialReference: SpatialReference? = null)

Constructs a Polygon with the given collection of Points.

If the spatial reference is null the spatial reference of the first point will be used, or null if there are no points.

Since

200.1.0

Parameters

points

the points with which to create the polygon. All points must have the same spatial reference.

spatialReference

the spatial reference for the polygon, defaults to null.