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
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. |