Skip to content

ym.modules.provider.MultiPolyline

Overview

Extends FeatureGroup to include multi-polyline creation. This is a layer consisting of multiple polylines that share styling and popup.

Deprecated

This class is deprecated. It will be removed in the next major revision (v4). Please use the class Polyline instead.

Initialization

Factory: ym.multiPolyline(latlng, options)

Instantiates a multi-polyline object with an array of arrays of geographic points (one for each individual polyline) and optionally an option object.

Parameter Description Data type Default value
latlng [erforderlich] LatLng[][]
options [optional] Polyline options

Methods

setLatLngs(latlngs)

Replaces all lines and their paths with the specified array of arrays of geographic points.

Parameter Description Data type Default value
latlngs LatLng[][]
  • Return: this

getLatLngs()

Returns an array of arrays of geographic points in each row.

  • Return: LatLng[][]

openPopup()

Opens the popup previously bound by bindPopup.

  • Return: this

toGeoJSON()

Returns a GeoJSON representation of the multipolyline (GeoJSON MultiLineString feature).

  • Return: object