namespace GMap.NET { using System.Collections.Generic; public class GDirections { /// /// contains a short textual description for the route, suitable for naming and disambiguating the route from alternatives. /// public string Summary; /// /// contains a human-readable representation of the duration. /// public string Duration; /// /// contains a value of the duration. /// public uint DurationValue; /// /// contains a human-readable representation of the distance, displayed in units as used at the origin /// (or as overridden within the units parameter in the request), in the language specified in the request. /// (For example, miles and feet will be used for any origin within the United States.) /// public string Distance; /// /// contains a value of the distance. /// public uint DistanceValue; /// /// contains the latitude/longitude coordinates of the origin of this leg. Because the Directions API /// calculates directions between locations by using the nearest transportation option (usually a road) /// at the start and end points, start_location may be different than the provided origin of this leg if, /// for example, a road is not near the origin. /// public PointLatLng StartLocation; /// /// contains the latitude/longitude coordinates of the given destination of this leg. Because the Directions /// API calculates directions between locations by using the nearest transportation option (usually a road) /// at the start and end points, end_location may be different than the provided destination of this leg if, /// for example, a road is not near the destination. /// public PointLatLng EndLocation; /// /// contains the human-readable address (typically a street address) reflecting the start_location of this leg. /// public string StartAddress; /// /// contains the human-readable address (typically a street address) reflecting the end_location of this leg. /// public string EndAddress; /// /// contains the copyrights text to be displayed for this route. You must handle and display this information yourself. /// public string Copyrights; /// /// contains an array of steps denoting information about each separate step of the leg of the journey. /// public List Steps; /// /// contains all points of the route /// public List Route; public override string ToString() { return Summary + " | " + Distance + " | " + Duration; } } public struct GDirectionStep { public string TravelMode; /// /// contains the location of the starting point of this step, as a single set of lat and lng fields. /// public PointLatLng StartLocation; /// /// contains the location of the ending point of this step, as a single set of lat and lng fields. /// public PointLatLng EndLocation; /// /// contains the typical time required to perform the step, until the next step. This field may be undefined if the duration is unknown. /// public string Duration; /// /// contains the distance covered by this step until the next step. This field may be undefined if the distance is unknown. /// public string Distance; /// /// contains formatted instructions for this step, presented as an HTML text string. /// public string HtmlInstructions; /// /// points of the step /// public List Points; public override string ToString() { return TravelMode + " | " + Distance + " | " + Duration + " | " + HtmlInstructions; } } }