Class: MultiLineString
- Last UpdatedMay 21, 2025
- 2 minute read
A MultiLineString is a collection of line strings represented as a
H.geo.MultiGeometry
with a H.geo.LineString
as generic type parameter T
.
Name | Type | Description |
---|---|---|
lineStrings |
Array.<!H.geo.LineString> |
The list of line-strings which are initially represented by the MultiLineString. |
Throws:
-
if the
lineStrings
argument is not valid
Extends
Methods
-
equals (other)boolean inherited
-
Checks whether the geometry is equal to the geometry supplied by the caller. Two geometries are considered as equal if they represent the same geometry type and have equal coordinate values.
Name Type Description other
* The geometry to check against
Returns:
Type Description boolean true
if the two geometries are equal, otherwisefalse
-
getBoundingBox ()H.geo.Rect inherited
-
Returns the bounding rectangle of the geometry.
Returns:
Type Description H.geo.Rect the bounding rectangle of the geometry or null
if the bounding rectangle can't be computed (e.g. for a geometry without coordinates) -
getGeometries ()Array.<!T> inherited
-
Returns the aggregated geometries of the multi-geometry. The returned geometries must be treated as read-only to not violate the integrity of the multi-geometry.
Returns:
Type Description Array.<!T> An array of geometries -
push (geometry) inherited
-
Adds the specified geometry to the current multi-geometry.
Name Type Description geometry
T A geometry which will be added to the current multi-geometry
Throws:
-
in case of invalid
geometry
argument
-
-
remove (geometry)T inherited
-
Removes the specified geometry from the multi-geometry.
Name Type Description geometry
T The geometry (by reference) to remove from this multi-geometry.
Returns:
Type Description T the removed geometry or null
if the geometry was not found -
removeAt (index)T inherited
-
Removes a contained geometry at the given index.
Name Type Description index
number The index of the geometry to remove.
Throws:
-
if no geometry exists at the given index.
Returns:
Type Description T the removed geometry. -
-
splice (index, opt_deleteCount, opt_items)Array.<!T> inherited
-
This method splices the specified MultiGeometry at the provided index, removing the specified number of items at that index and inserting new items.
Returns:
Type Description Array.<!T> the removed geometries. -
toGeoJSON ()Object inherited
-
To obtain a GeoJSON representation of the given geometry.
Returns:
Type Description Object A GeoJSON Geometry object representing the given geometry. -
toString () inherited
-
To obtain a Well-Known-Text (WKT) representation of the geometry.