Constructor
new MultiLinestring(geoJSON)
The `MultiLinestring` class represents a multi-linestring annotation item. It inherits from the `AnnotationItem` class and provides methods to work with multi-linestring annotations.
Parameters:
Name | Type | Description |
---|---|---|
geoJSON |
Object | The GeoJSON object containing annotation data. |
Properties:
Name | Type | Description |
---|---|---|
_paperItem |
paper.Group | The associated paper item representing the multi-linestring. |
- 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 each point in the multi-linestring.
- Source:
Returns:
An array containing arrays of x and y coordinates for each point.
- Type
- Array
getGeoJSONType() → {Object}
Get the type of this object.
- Source:
Returns:
with fields `type === 'MultiLineString'`
- Type
- Object
getProperties() → {Object}
This method returns the properties associated with the multi-linestring, including stroke color and widths.
- Source:
Returns:
The properties object.
- Type
- Object
getStyleProperties() → {Object}
This method returns the style properties of the multi-linestring in JSON format.
- Source:
Returns:
The style properties in JSON format.
- Type
- Object
setStyle(properties)
This method applies the provided style properties to the multi-linestring annotation item.
Parameters:
Name | Type | Description |
---|---|---|
properties |
Object | The style properties to set. |
- Source:
(static) supportsGeoJSONType(type, subtypeopt) → {Boolean}
Retrieves the supported types by the MultiLineString 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