//----------------------------------------------------------------------- // // Copyright (c) 2016 Mapbox. All rights reserved. // //----------------------------------------------------------------------- namespace Mapbox.Directions { using System.Collections.Generic; using Mapbox.Json; using Mapbox.Utils; using Mapbox.Utils.JsonConverters; /// /// A Route from a Directions API call. /// public class Route { /// /// Gets or sets the legs. /// /// The legs. [JsonProperty("legs")] public List Legs { get; set; } /// /// Gets or sets the geometry. Polyline is an array of LatLng's. /// /// The geometry. [JsonProperty("geometry")] [JsonConverter(typeof(PolylineToVector2dListConverter))] public List Geometry { get; set; } /// /// Gets or sets the duration. /// /// The duration. [JsonProperty("duration")] public double Duration { get; set; } /// /// Gets or sets the distance. /// /// The distance. [JsonProperty("distance")] public double Distance { get; set; } /// /// Float indicating the weight in units described by 'weight_name'. /// [JsonProperty("weight")] public float Weight { get; set; } /// /// String indicating which weight was used. The default is routability which is duration based, with additional penalties for less desirable maneuvers. /// [JsonProperty("weight_name")] public string WeightName { get; set; } } }