geometry.LineString.fromEncodedCoordinates

Static function.

Creates a geometry.LineString geometry based on a string of Base64-encoded coordinates.

Returns a geometry.

{ geometry.LineString } geometry.LineString.fromEncodedCoordinates(encodedCoordinates)

Parameters:

Parameter Default value Description
encodedCoordinates *

Type: String

Base64-encoded coordinates of polyline points.

* Mandatory parameter/option.

Example:

var base64Coords = "gMPJAYDw-gJAQg8AQEIPAEBCDwBAQg8A",
    geometry = ymaps.geometry.LineString.fromEncodedCoordinates(base64Coords);
    polyline = new ymaps.Polyline(geometry);