ol/format/Polyline
Classes
- Polyline
Functions
-
decodeDeltas(encoded, stride, factor){Array.<number>}
-
import {decodeDeltas} from 'ol/format/Polyline';Decode a list of n-dimensional points from an encoded string
Name Type Description encodedstring An encoded string.
stridenumber The number of dimension of the points in the encoded string.
factornumber | undefined The factor by which the resulting numbers will be divided. Default is
1e5.- Deprecated
- Yes
Returns:
A list of n-dimensional points.
-
decodeFloats(encoded, factor){Array.<number>}
-
import {decodeFloats} from 'ol/format/Polyline';Decode a list of floating point numbers from an encoded string
Name Type Description encodedstring An encoded string.
factornumber | undefined The factor by which the result will be divided. Default is
1e5.- Deprecated
- Yes
Returns:
A list of floating point numbers.
-
encodeDeltas(numbers, stride, factor){string}
-
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 numbersArray.<number> A list of n-dimensional points.
stridenumber The number of dimension of the points in the list.
factornumber | undefined The factor by which the numbers will be multiplied. The remaining decimal places will get rounded away. Default is
1e5.- Deprecated
- Yes
Returns:
The encoded string.
-
encodeFloats(numbers, factor){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 numbersArray.<number> A list of floating point numbers.
factornumber | undefined The factor by which the numbers will be multiplied. The remaining decimal places will get rounded away. Default is
1e5.- Deprecated
- Yes
Returns:
The encoded string.
Type Definitions
-
Options{Object}
-
Properties:
Name Type Description factornumber
(defaults to 1e5)The factor by which the coordinates values will be scaled.
geometryLayoutGeometryLayout
(defaults to 'XY')Layout of the feature geometries created by the format reader.
© 2005-present, OpenLayers Contributors All rights reserved.Licensed under the BSD 2-Clause License.
https://openlayers.org/en/latest/apidoc/module-ol_format_Polyline.html