Coordinates.
Optional
opt_layout: GeometryLayoutLayout.
Linestring geometry.
stable
Append the passed coordinate to the coordinates of the linestring.
Coordinate.
stable
stable
Make a complete copy of the geometry.
Clone.
stable
Iterate over each segment, calling the provided callback.
If the callback returns a truthy value the function returns that
value immediately. Otherwise the function returns false
.
Function called for each segment.
Optional
opt_this: SThe object to be used as the value of 'this' within callback.
Value.
Return the closest point of the geometry to the passed point as coordinate.
Point.
Optional
opt_closestPoint: CoordinateClosest point.
Closest point.
stable
Return the coordinate at the provided fraction along the linestring.
The fraction
is a number between 0 and 1, where 0 is the start of the
linestring and 1 is the end.
Fraction.
Optional
opt_dest: CoordinateOptional coordinate whose values will be modified. If not provided, a new coordinate will be returned.
Coordinate of the interpolated point.
Returns the coordinate at m
using linear interpolation, or null
if no
such coordinate exists.
opt_extrapolate
controls extrapolation beyond the range of Ms in the
MultiLineString. If opt_extrapolate
is true
then Ms less than the first
M will return the first coordinate and Ms greater than the last M will
return the last coordinate.
M.
Optional
opt_extrapolate: booleanExtrapolate. Default is false
.
Coordinate.
stable
Return the coordinates of the linestring.
Coordinates.
stable
Return the first coordinate of the geometry.
First coordinate.
stable
Return the last coordinate of the geometry.
Last point.
stable
Return the layout of the geometry.
Layout.
stable
Get the type of this geometry.
Geometry type.
Returns true if this geometry includes the specified coordinate. If the coordinate is on the boundary of the geometry, returns false.
Coordinate.
Contains coordinate.
stable
Listen for a certain type of event.
The event type or array of event types.
The listener function.
Optional
opt_this: ObjectThe object to use as this
in listener
.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
stable
Listen once for a certain type of event.
The event type or array of event types.
The listener function.
Optional
opt_this: ObjectThe object to use as this
in listener
.
Unique key for the listener. If called with an array of event types as the first argument, the return will be an array of keys.
stable
Rotate the geometry around a given coordinate. This modifies the geometry coordinates in place.
Rotation angle in radians.
The rotation center.
Scale the geometry (with an optional origin). This modifies the geometry coordinates in place.
The scaling factor in the x-direction.
Optional
opt_sy: numberThe scaling factor in the y-direction (defaults to sx).
Optional
opt_anchor: CoordinateThe scale origin (defaults to the center of the geometry extent).
Set the coordinates of the linestring.
Coordinates.
Optional
opt_layout: GeometryLayoutLayout.
stable
Sets a collection of key-value pairs. Note that this changes any existing properties and adds new ones (it does not remove any existing properties).
Values.
Optional
opt_silent: booleanUpdate without triggering an event.
stable
Create a simplified version of this geometry. For linestrings, this uses the the Douglas Peucker algorithm. For polygons, a quantization-based simplification is used to preserve topology.
The tolerance distance for simplification.
A new, simplified version of the original geometry.
Transform each coordinate of the geometry from one coordinate reference
system to another. The geometry is modified in place.
For example, a line will be transformed to a line and a circle to a circle.
If you do not want the geometry modified in place, first clone()
it and
then use this function on the clone.
The current projection. Can be a string identifier or a ol.proj.Projection object.
The desired projection. Can be a string identifier or a ol.proj.Projection object.
This geometry. Note that original geometry is modified in place.
stable
Static
unRemoves an event listener using the key returned by on()
or once()
.
Note that using the ol.Observable.unByKey static function is to
be preferred.
stable
Generated using TypeDoc
Classdesc
Linestring geometry.
Param: coordinates
Coordinates.
Param: opt_layout
Layout.
Api
stable