Table of Contents

Class Polyline

Namespace
GoogleMapsApi.Entities.Routes.Response
Assembly
GoogleMapsApi.dll

Polyline returned by the Routes API. By default the API returns the encoded-polyline format (same as the legacy Directions API); use the DecodedPoints helper to expand it into a list of Locations.

public sealed class Polyline
Inheritance
Polyline
Inherited Members

Properties

DecodedPoints

Decoded points from EncodedPolyline. Empty when no encoded polyline is set.

[JsonIgnore]
public IReadOnlyList<Location> DecodedPoints { get; }

Property Value

IReadOnlyList<Location>

EncodedPolyline

Encoded polyline string. See DecodedPoints.

[JsonPropertyName("encodedPolyline")]
public string? EncodedPolyline { get; set; }

Property Value

string

GeoJsonLinestring

Raw GeoJSON LineString returned when PolylineEncoding is set to GeoJsonLineString. Decoding is left to the caller (any GeoJSON library will do).

[JsonPropertyName("geoJsonLinestring")]
public object? GeoJsonLinestring { get; set; }

Property Value

object