new MultiPolygon(coordinates, opt_layout, opt_endss)
Name | Type | Description |
---|---|---|
coordinates |
Array.<Array.<Array.<module:ol/coordinate~Coordinate>>> | Array.<number> |
Coordinates.
For internal use, flat coordinats in combination with |
layout |
module:ol/geom/GeometryLayout |
Layout. |
endss |
Array.<number> |
Array of ends for internal use with flat coordinates. |
Methods
-
appendPolygon(polygon)
geom/MultiPolygon.js, line 117 -
Append the passed polygon to this multipolygon.
Name Type Description polygon
module:ol/geom/Polygon~Polygon Polygon.
-
Make a complete copy of the geometry.
Returns:
Clone.
-
getArea(){number}
geom/MultiPolygon.js, line 182 -
Return the area of the multipolygon on projected plane.
Returns:
Area (on projected plane).
-
getCoordinates(opt_right){Array.<Array.<Array.<module:ol/coordinate~Coordinate>>>}
geom/MultiPolygon.js, line 200 -
Get the coordinate array for this geometry. This array has the structure of a GeoJSON coordinate array for multi-polygons.
Name Type Description right
boolean Orient coordinates according to the right-hand rule (counter-clockwise for exterior and clockwise for interior rings). If
false
, coordinates will be oriented according to the left-hand rule (clockwise for exterior and counter-clockwise for interior rings). By default, coordinate orientation will depend on how the geometry was constructed.Returns:
Coordinates.
-
Return the interior points as
multipoint
.Returns:
Interior points as XYM coordinates, where M is the length of the horizontal intersection that the point belongs to.
-
Return the polygon at the specified index.
Name Type Description index
number Index.
Returns:
Polygon.
-
Return the polygons of this multipolygon.
Returns:
Polygons.
-
getType()
geom/MultiPolygon.js, line 336 -
-
intersectsExtent()
geom/MultiPolygon.js, line 344 -
-
setCoordinates(coordinates, opt_layout)
geom/MultiPolygon.js, line 356 -
Set the coordinates of the multipolygon.
Name Type Description coordinates
Array.<Array.<Array.<module:ol/coordinate~Coordinate>>> Coordinates.
layout
module:ol/geom/GeometryLayout Layout.