Class: Polyline

ol/format/Polyline~Polyline


import Polyline from 'ol/format/Polyline';

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, module:ol/format/Polyline~Polyline#readFeatures will return the feature in an array.

new Polyline(opt_options)

format/Polyline.js, line 38
Name Type Description
options

Optional configuration object.

Name Type Default Description
factor number 1e5

The factor by which the coordinates values will be scaled.

geometryLayout module:ol/geom/GeometryLayout 'XY'

Layout of the feature geometries created by the format reader.