Constructor
new MultiPolygon(geoJSON)
The `MultiPolygon` class represents a multi-polygon annotation item. It inherits from the `AnnotationItem` class and provides methods to work with multi-polygon annotations.
Parameters:
Name | Type | Description |
---|---|---|
geoJSON |
Object | The GeoJSON object containing annotation data. |
Properties:
Name | Type | Description |
---|---|---|
_paperItem |
paper.CompoundPath | The associated paper item representing the multi-polygon. |
- Source:
Throws:
-
Throws an error if the GeoJSON type is invalid.
- Type
- string
Extends
- AnnotationItem
Methods
getCoordinates() → {Array}
This method returns an array of arrays representing the coordinates of the polygons and their holes in the multi-polygon.
- Source:
Returns:
An array of arrays representing the coordinates of the polygons and holes.
- Type
- Array
getGeoJSONType() → {Object}
Get the type of this object.
- Source:
Returns:
with fields `type in ['MultiPolygon', 'Polygon']`
- Type
- Object
getProperties() → {undefined}
This method returns `undefined` since the MultiPolygon class does not have specific properties.
- Source:
Returns:
- Type
- undefined
(static) supportsGeoJSONType(type, subtypeopt) → {Boolean}
Retrieves the supported types by the Ellipse annotation item.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
type |
String | |||
subtype |
String |
<optional> |
null |
- Source:
Returns:
Whether this constructor supports the requested type/subtype
- Type
- Boolean