This namespace contains methods for encoding and decoding the Flexible Polyline.
Methods
-
H.util.flexiblePolyline.decode (encodedPolyline)H.util.flexiblePolyline.Data static
-
Decodes the specified encoded Flexible Polyline string.
Name Type Description encodedPolylinestring The encoded string.
Throws:
-
If the specified data has an invalid encoding.
- Type
- Error
Returns:
Type Description H.util.flexiblePolyline.Data -
-
Encodes the specified number sequence as a Flexible Polyline.
Name Type Description dataH.util.flexiblePolyline.Data Returns:
Type Description string The encoded polyline
Type Definitions
-
This object describes a structure of the object accepted by the "encode" and return by the "decode" methods.
Properties:
Name Type Argument Description polylineArray.<Array.<number>> The sequence of [lat, lng] or [lat, lng, {third_dim}].
precisionnumber <optional>
How many decimal digits of precision to store the latitude and longitude, default is
5.thirdDimnumber <optional>
Type of the third dimension if present in the input.
thirdDimPrecisionnumber <optional>
How many decimal digits of precision to store the third dimension.