Documentation
Reference
2.1.53 (current version)
collection
interactivityModel
Interfaces

geometry.Polygon.fromEncodedCoordinates

Static function.

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

Returns a geometry.

{ geometry.Polygon } geometry.Polygon.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 = "AAAAAAAAAAAAAAAAQEtMAEBLTAAAAAAAAAAAAMC0s__AtLP_AAAAAA==;QEIPAEBCDwAAAAAAQEIPAEBCDwAAAAAAAAAAAMC98P_AvfD_AAAAAA==",
    geometry = ymaps.geometry.Polygon.fromEncodedCoordinates(base64Coords);
    polygon = new ymaps.Polygon(geometry);