PolylineAlgorithm for .NET

Build NuGet License: MIT

Lightweight .NET Standard 2.1 library implementing Google Encoded Polyline Algorithm. More info about the algorithm can be found at Google Developers.

Prerequisites

PolylineAlgorithm for .NET is available as a NuGet package targeting .NET Standard 2.1.

.NET CLI

dotnet add package PolylineAlgorithm

Package Manager Console

Install-Package PolylineAlgorithm

How to use it

In the majority of cases you would like to inherit AbstractPolylineDecoder<TPolyline, TCoordinate> and AbstractPolylineEncoder<TCoordinate, TPolyline> classes and implement abstract methods that are mainly responsible for extracting data from your coordinate and polyline types and creating new instances of them.

In some cases you may want to implement your own decoder and encoder from scratch. In that case you can use PolylineEncoding static class that offers static methods for encoding and decoding polyline segments.