Skip to end of metadata
Go to start of metadata

Defines the metadata required to call directions API.

Definition

public class DirectionsRequest : SignableRequest

Summary

The following table summarizes the members exposed in this class.

Public Constructors

DirectionsRequest Constructor() Initializes a new instance of the DirectionsRequest class.

Public Properties

Alternatives alternatives (optional), if set to true, specifies that the Directions service may provide more than one route alternative in the response. Note that providing route alternatives may increase the response time from the server.
ArrivalTime The time of arrival. Required when TravelMode = Transit
Avoid avoid (optional) indicates that the calculated route(s) should avoid the indicated features. Currently, this parameter supports the following three arguments: tolls indicates that the calculated route should avoid toll roads/bridges. highways indicates that the calculated route should avoid highways. ferries indicates that the calculated route should avoid ferries. (For more information see Route Restrictions below.)
DepartureTime The time of departure. Required when TravelMode = Transit
Destination destination (required) — The address or textual latitude/longitude value from which you wish to calculate directions. If you pass an address as a string, the Directions service will geocode the string and convert it to a latitude/longitude coordinate to calculate directions. If you pass coordinates, ensure that no space exists between the latitude and longitude values.
Language language (optional) — The language in which to return results. See the supported list of domain languages. Note that we often update supported languages so this list may not be exhaustive. If language is not supplied, the Directions service will attempt to use the native language of the browser wherever possible. You may also explicitly bias the results by using localized domains of http://map.google.com. See Region Biasing for more information.
OptimizeWaypoints optimize the provided route by rearranging the waypoints in a more efficient order. (This optimization is an application of the Travelling Salesman Problem.) http://en.wikipedia.org/wiki/Travelling_salesman_problem
Origin origin (Required) - The address or textual latitude/longitude value from which you wish to calculate directions. If you pass an address as a string, the Directions service will geocode the string and convert it to a latitude/longitude coordinate to calculate directions. If you pass coordinates, ensure that no space exists between the latitude and longitude values.
TravelMode (optional, defaults to driving) — specifies what mode of transport to use when calculating directions. Valid values are specified in Travel Modes.
Waypoints waypoints (optional) specifies an array of waypoints. Waypoints alter a route by routing it through the specified location(s). A waypoint is specified as either a latitude/longitude coordinate or as an address which will be geocoded. (For more information on waypoints, see Using Waypoints in Routes below.)

Protected Methods

GetQueryStringParameters() Gets the query string parameters.

Public Constructors

public DirectionsRequest()

Public Properties

public bool Alternatives { get; set; }

alternatives (optional), if set to true, specifies that the Directions service may provide more than one route alternative in the response. Note that providing route alternatives may increase the response time from the server.

public DateTime ArrivalTime { get; set; }

The time of arrival. Required when TravelMode = Transit

public AvoidWay Avoid { get; set; }

avoid (optional) indicates that the calculated route(s) should avoid the indicated features. Currently, this parameter supports the following three arguments: tolls indicates that the calculated route should avoid toll roads/bridges. highways indicates that the calculated route should avoid highways. ferries indicates that the calculated route should avoid ferries. (For more information see Route Restrictions below.)

public DateTime DepartureTime { get; set; }

The time of departure. Required when TravelMode = Transit

public string Destination { get; set; }

destination (required) — The address or textual latitude/longitude value from which you wish to calculate directions. If you pass an address as a string, the Directions service will geocode the string and convert it to a latitude/longitude coordinate to calculate directions. If you pass coordinates, ensure that no space exists between the latitude and longitude values.

public string Language { get; set; }

language (optional) — The language in which to return results. See the supported list of domain languages. Note that we often update supported languages so this list may not be exhaustive. If language is not supplied, the Directions service will attempt to use the native language of the browser wherever possible. You may also explicitly bias the results by using localized domains of http://map.google.com. See Region Biasing for more information.

public bool OptimizeWaypoints { get; set; }

optimize the provided route by rearranging the waypoints in a more efficient order. (This optimization is an application of the Travelling Salesman Problem.) http://en.wikipedia.org/wiki/Travelling_salesman_problem

public string Origin { get; set; }

origin (Required) - The address or textual latitude/longitude value from which you wish to calculate directions. If you pass an address as a string, the Directions service will geocode the string and convert it to a latitude/longitude coordinate to calculate directions. If you pass coordinates, ensure that no space exists between the latitude and longitude values.

public TravelMode TravelMode { get; set; }

(optional, defaults to driving) — specifies what mode of transport to use when calculating directions. Valid values are specified in Travel Modes.

public String[] Waypoints { get; set; }

waypoints (optional) specifies an array of waypoints. Waypoints alter a route by routing it through the specified location(s). A waypoint is specified as either a latitude/longitude coordinate or as an address which will be geocoded. (For more information on waypoints, see Using Waypoints in Routes below.)

Protected Methods

protected QueryStringParametersList GetQueryStringParameters()

Gets the query string parameters.

  • No labels