Class: Polyline

ol/format/Polyline~Polyline


import Polyline from 'ol/format/Polyline.js';

Feature format for reading and writing data in the Encoded Polyline Algorithm Format.

When reading features, the coordinates are assumed to be in two dimensions and in [latitude, longitude] order.

As Polyline sources contain a single feature, readFeatures will return the feature in an array.

new Polyline(options)

Name Type Description
factor number (defaults to 1e5)

The factor by which the coordinates values will be scaled.

geometryLayout GeometryLayout (defaults to 'XY')

Layout of the feature geometries created by the format reader.

Extends