new Polygon
Create a polygon from an array of vertex arrays. Coordinates for the exterior ring will be forced to clockwise order. Coordinates for any interior rings will be forced to counter-clockwise order. In cases where the opposite winding order occurs in the passed vertex arrays, they will be modified in place.
Parameters:
| Name | Type | Argument | Description |
|---|---|---|---|
coordinates |
Array.<ol.CoordinateArray> | Array of rings. First is outer, any remaining are inner. |
|
shared |
ol.geom.SharedVertices |
<optional> |
(Optional) Shared vertices. |
- Source:
- polygon.js, line 26
Extends
Methods
-
getCoordinates
-
- Source:
- polygon.js, line 94
Returns:
Coordinates array.
- Type
- Array.<ol.CoordinateArray>