Show / Hide Table of Contents

Class PolylineUtils

A set of Polyline utils.

Inheritance
System.Object
PolylineUtils
Namespace:Mapbox.Utils
Assembly:Mapbox.Utils.dll
Syntax
public static class PolylineUtils : object

Methods

Decode(String, Int32)

Decodes an encoded path string into a sequence of Positions.

Declaration
public static List<Vector2d> Decode(string encodedPath, int precision = 5)
Parameters
Type Name Description
System.String encodedPath

A string representing a path.

System.Int32 precision

Level of precision. OSRMv4 uses 6, OSRMv5 and Google use 5.

Returns
Type Description
List<Vector2d>

List of Vector2d making up the line.

Remarks

Adapted from https://github.com/mapbox/mapbox-java/blob/9bda93a2f84e26ad67434de1a5c73c335ecac12c/libjava/lib/src/main/java/com/mapbox/services/commons/utils/PolylineUtils.java

Encode(List<Vector2d>, Int32)

Encodes a sequence of Positions into an encoded path string.

Declaration
public static string Encode(List<Vector2d> path, int precision = 5)
Parameters
Type Name Description
List<Vector2d> path

List of Vector2d making up the line.

System.Int32 precision

Level of precision. OSRMv4 uses 6, OSRMv5 and Google use 5..

Returns
Type Description
System.String

A string representing a polyLine.

Remarks

Adapted from https://github.com/mapbox/mapbox-java/blob/9bda93a2f84e26ad67434de1a5c73c335ecac12c/libjava/lib/src/main/java/com/mapbox/services/commons/utils/PolylineUtils.java

In This Article
  • Methods
    • Decode(String, Int32)
    • Encode(List<Vector2d>, Int32)
Back to top Copyright © 2015-2016 Microsoft
Generated by DocFX