Class: MultiLineString

ol/geom/MultiLineString~MultiLineString


import MultiLineString from 'ol/geom/MultiLineString';

Multi-linestring geometry.

new MultiLineString(coordinates, opt_layout, opt_ends)

geom/MultiLineString.js, line 23
Name Type Description
coordinates Array.<(Array.<module:ol/coordinate~Coordinate>|module:ol/geom~MultiLineString)> | Array.<number>

Coordinates or LineString geometries. (For internal use, flat coordinates in combination with opt_layout and opt_ends are also accepted.)

layout module:ol/geom/GeometryLayout

Layout.

ends Array.<number>

Flat coordinate ends for internal use.

Methods

appendLineString(lineString)

geom/MultiLineString.js, line 82

Append the passed linestring to the multilinestring.

Name Type Description
lineString module:ol/geom/LineString~LineString

LineString.

clone(){module:ol/geom/MultiLineString~MultiLineString}

geom/MultiLineString.js, line 98

Make a complete copy of the geometry.

Returns:
Clone.

getCoordinateAtM(m, opt_extrapolate, opt_interpolate){module:ol/coordinate~Coordinate}

geom/MultiLineString.js, line 141

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.

opt_interpolate controls interpolation between consecutive LineStrings within the MultiLineString. If opt_interpolate is true the coordinates will be linearly interpolated between the last coordinate of one LineString and the first coordinate of the next LineString. If opt_interpolate is false then the function will return null for Ms falling between LineStrings.

Name Type Description
m number

M.

extrapolate boolean

Extrapolate. Default is false.

interpolate boolean

Interpolate. Default is false.

Returns:
Coordinate.

getCoordinates(){Array.<Array.<module:ol/coordinate~Coordinate>>}

geom/MultiLineString.js, line 159

Return the coordinates of the multilinestring.

Returns:
Coordinates.

getLineString(index){module:ol/geom/LineString~LineString}

geom/MultiLineString.js, line 177

Return the linestring at the specified index.

Name Type Description
index number

Index.

Returns:
LineString.

getLineStrings(){Array.<module:ol/geom/LineString~LineString>}

geom/MultiLineString.js, line 190

Return the linestrings of this multilinestring.

Returns:
LineStrings.

getType()

geom/MultiLineString.js, line 241

intersectsExtent()

geom/MultiLineString.js, line 249

setCoordinates(coordinates, opt_layout)

geom/MultiLineString.js, line 261

Set the coordinates of the multilinestring.

Name Type Description
coordinates Array.<Array.<module:ol/coordinate~Coordinate>>

Coordinates.

layout module:ol/geom/GeometryLayout

Layout.