lineString
Creates a LineString
geometry from an array of positions.
Line string must contain at least 2 positions. Empty line strings with 0 positions are allowed.
Type Parameters
-
P
Parameters
Name | Type | Description |
---|---|---|
pts | Position[] | LineString coordinates |
options? | object | Optional geometry options |
options.id? | number | string | Optional identifier to be assigned to the geometry instance. |
options.properties? | P | Optional data to be assigned to the geometry instance. |
Returns
LineString<P>
A new Geometry object
Throws
InvalidGeoJSONError
on line with 1 position