Class Route
- Namespace
- GoogleMapsApi.Entities.Routes.Response
- Assembly
- GoogleMapsApi.dll
A computed route — usually one per response, more when alternatives are requested.
public sealed class Route
- Inheritance
-
Route
- Inherited Members
Properties
DistanceMeters
Total distance covered by the route in meters.
[JsonPropertyName("distanceMeters")]
public int? DistanceMeters { get; set; }
Property Value
- int?
Duration
Total travel time including traffic. Returned as a protobuf-duration string
(e.g. "123s"); see DurationSeconds for a parsed numeric value.
[JsonPropertyName("duration")]
public string? Duration { get; set; }
Property Value
DurationSeconds
Duration parsed to a number of seconds.
[JsonIgnore]
public double? DurationSeconds { get; }
Property Value
Legs
Legs of the route (one per origin/intermediate/destination pair).
[JsonPropertyName("legs")]
public List<RouteLeg>? Legs { get; set; }
Property Value
OptimizedIntermediateWaypointIndex
Optimized intermediate-waypoint order when
OptimizeWaypointOrder is true. The values are
zero-based indices into the request's Intermediates array.
[JsonPropertyName("optimizedIntermediateWaypointIndex")]
public List<int>? OptimizedIntermediateWaypointIndex { get; set; }
Property Value
Polyline
Encoded polyline of the route geometry.
[JsonPropertyName("polyline")]
public Polyline? Polyline { get; set; }
Property Value
RouteLabels
Labels describing this route (e.g. DEFAULT_ROUTE, FUEL_EFFICIENT).
[JsonPropertyName("routeLabels")]
public List<RouteLabel>? RouteLabels { get; set; }
Property Value
RouteToken
Token usable with the Navigation SDK to start turn-by-turn for this route.
[JsonPropertyName("routeToken")]
public string? RouteToken { get; set; }
Property Value
StaticDuration
Travel time ignoring current traffic. Also a protobuf-duration string; see StaticDurationSeconds.
[JsonPropertyName("staticDuration")]
public string? StaticDuration { get; set; }
Property Value
StaticDurationSeconds
StaticDuration parsed to a number of seconds.
[JsonIgnore]
public double? StaticDurationSeconds { get; }
Property Value
TravelAdvisory
Travel-advisory metadata (toll info, fuel consumption, speed-reading intervals).
[JsonPropertyName("travelAdvisory")]
public RouteTravelAdvisory? TravelAdvisory { get; set; }
Property Value
Viewport
Bounding viewport that contains the route.
[JsonPropertyName("viewport")]
public Viewport? Viewport { get; set; }
Property Value
Warnings
Free-text descriptions of conditions affecting the route.
[JsonPropertyName("warnings")]
public List<string>? Warnings { get; set; }