--- layout: api title: "v1.6.0 API: L.MultiPolyline" categories: api version: v1.6.0 permalink: /api/v1.6.0/l-multipolyline ---
Extends FeatureGroup to allow creating multi-polylines (single layer that consists of several polylines that share styling/popup).
Factory | Description |
---|---|
L.multiPolyline(
|
Instantiates a multi-polyline object given an array of arrays of geographical points (one for each individual polyline) and optionally an options object. |
MultiPolylines accept all Polyline methods but have different behavior around their coordinate contents since they can contain multiple line features:
Method | Returns | Description |
---|---|---|
setLatLngs(
|
this |
Replace all lines and their paths with the given array of arrays of geographical points. |
getLatLngs() |
|
Returns an array of arrays of geographical points in each line. |
openPopup() |
this |
Opens the popup previously bound by bindPopup. |
toGeoJSON() |
Object |
Returns a GeoJSON representation of the multipolyline (GeoJSON MultiLineString Feature). |