Documentation
Reference
2.1.53 (current version)
collection
interactivityModel
Interfaces

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:

ParameterDefault valueDescription
encodedCoordinates*
[no-highlight[

* Mandatory parameter/option.

]no-highlight]

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);