Classes
Functions
-
import {decodeDeltas} from 'ol/format/Polyline';
Decode a list of n-dimensional points from an encoded string
Name Type Description encoded
string An encoded string.
stride
number The number of dimension of the points in the encoded string.
factor
number | undefined The factor by which the resulting numbers will be divided. Default is
1e5
.Returns:
A list of n-dimensional points.
-
import {decodeFloats} from 'ol/format/Polyline';
Decode a list of floating point numbers from an encoded string
Name Type Description encoded
string An encoded string.
factor
number | undefined The factor by which the result will be divided. Default is
1e5
.Returns:
A list of floating point numbers.
-
import {encodeDeltas} from 'ol/format/Polyline';
Encode a list of n-dimensional points and return an encoded string
Attention: This function will modify the passed array!
Name Type Description numbers
Array.<number> A list of n-dimensional points.
stride
number The number of dimension of the points in the list.
factor
number | undefined The factor by which the numbers will be multiplied. The remaining decimal places will get rounded away. Default is
1e5
.Returns:
The encoded string.
-
import {encodeFloats} from 'ol/format/Polyline';
Encode a list of floating point numbers and return an encoded string
Attention: This function will modify the passed array!
Name Type Description numbers
Array.<number> A list of floating point numbers.
factor
number | undefined The factor by which the numbers will be multiplied. The remaining decimal places will get rounded away. Default is
1e5
.Returns:
The encoded string.
Type Definitions
-
Options{Object}
-
Properties:
Name Type Argument Default Description factor
number <optional>
1e5 The factor by which the coordinates values will be scaled.
geometryLayout
GeometryLayout <optional>
'XY' Layout of the feature geometries created by the format reader.