Online Maps  v3
OnlineMapsGoogleDirections Class Reference

This class is used to search for a route by address or coordinates.
You can create a new instance using OnlineMapsGoogleDirections.Find.
https://developers.google.com/maps/documentation/directions/intro More...

Inheritance diagram for OnlineMapsGoogleDirections:
OnlineMapsTextWebService OnlineMapsWebServiceAPI

Classes

class  Params
 Request parameters. More...
 

Public Types

enum  Avoid { Avoid.none, Avoid.tolls, Avoid.highways, Avoid.ferries }
 Indicates that the calculated route(s) should avoid the indicated features. More...
 
enum  Mode { Mode.driving, Mode.walking, Mode.bicycling, Mode.transit }
 Mode of transport to use when calculating directions. More...
 
enum  TrafficModel { TrafficModel.bestGuess, TrafficModel.pessimistic, TrafficModel.optimistic }
 Specifies the assumptions to use when calculating time in traffic. More...
 
enum  TransitMode {
  TransitMode.bus = 1, TransitMode.subway = 2, TransitMode.train = 4, TransitMode.tram = 8,
  TransitMode.rail = 16
}
 Specifies one or more preferred modes of transit. More...
 
enum  TransitRoutingPreference { TransitRoutingPreference.lessWalking, TransitRoutingPreference.fewerTransfers }
 Specifies preferences for transit routes. More...
 
enum  Units { Units.metric, Units.imperial }
 Specifies the unit system to use when displaying results. More...
 

Static Public Member Functions

static OnlineMapsGoogleDirections Find (Params p)
 Creates a new request for a route search. More...
 
static OnlineMapsGoogleDirectionsResult GetResult (string response)
 Converts the response string to a result object. More...
 

Additional Inherited Members

- Public Member Functions inherited from OnlineMapsTextWebService
override void Destroy ()
 Destroys the current request to webservice. More...
 
- Public Attributes inherited from OnlineMapsTextWebService
Action< string > OnComplete
 Event that occurs when a response is received from webservice. More...
 
new Action< OnlineMapsTextWebServiceOnFailed
 Event that occurs when an error response is received from webservice More...
 
new Action< OnlineMapsTextWebServiceOnFinish
 This event is occurs after other events, before disposing the request More...
 
new Action< OnlineMapsTextWebServiceOnSuccess
 Event that occurs when a success response is received from webservice More...
 
- Public Attributes inherited from OnlineMapsWebServiceAPI
Action< OnlineMapsWebServiceAPIOnFailed
 Event that occurs when an error response is received from webservice. More...
 
Action< OnlineMapsWebServiceAPIOnFinish
 Event that occurs after OnComplete, when the response from webservice processed. More...
 
Action< OnlineMapsWebServiceAPIOnDispose
 Event that occurs when the current request instance is disposed. More...
 
Action< OnlineMapsWebServiceAPIOnSuccess
 Event that occurs when a success response is received from webservice. More...
 
object customData
 In this variable you can put any data that you need to work with requests. More...
 
- Protected Member Functions inherited from OnlineMapsTextWebService
void OnRequestComplete (OnlineMapsWWW www)
 Checks whether the response from webservice. More...
 
- Protected Attributes inherited from OnlineMapsTextWebService
string _response
 Response string More...
 
- Properties inherited from OnlineMapsTextWebService
string response [get]
 Gets a response from webservice. More...
 
- Properties inherited from OnlineMapsWebServiceAPI
OnlineMapsQueryStatus status [get]
 Gets the current status of the request to webservice. More...
 

Detailed Description

This class is used to search for a route by address or coordinates.
You can create a new instance using OnlineMapsGoogleDirections.Find.
https://developers.google.com/maps/documentation/directions/intro

Member Enumeration Documentation

◆ Avoid

Indicates that the calculated route(s) should avoid the indicated features.

Enumerator
none 

None avoid.

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.

◆ Mode

Mode of transport to use when calculating directions.

Enumerator
driving 

Indicates standard driving directions using the road network.

walking 

Requests walking directions via pedestrian paths & sidewalks (where available).

bicycling 

Requests bicycling directions via bicycle paths & preferred streets (where available).

transit 

Requests directions via public transit routes (where available).
If you set the mode to transit, you can optionally specify either a departure_time or an arrival_time.
If neither time is specified, the departure_time defaults to now (that is, the departure time defaults to the current time).

◆ TrafficModel

Specifies the assumptions to use when calculating time in traffic.

Enumerator
bestGuess 

Indicates that the returned duration_in_traffic should be the best estimate of travel time given what is known about both historical traffic conditions and live traffic.

pessimistic 

Indicates that the returned duration_in_traffic should be longer than the actual travel time on most days, though occasional days with particularly bad traffic conditions may exceed this value.

optimistic 

Indicates that the returned duration_in_traffic should be shorter than the actual travel time on most days, though occasional days with particularly good traffic conditions may be faster than this value.

◆ TransitMode

Specifies one or more preferred modes of transit.

Enumerator
bus 

Indicates that the calculated route should prefer travel by bus.

subway 

Indicates that the calculated route should prefer travel by subway.

train 

Indicates that the calculated route should prefer travel by train.

tram 

Indicates that the calculated route should prefer travel by tram and light rail.

rail 

Indicates that the calculated route should prefer travel by train, tram, light rail, and subway. This is equivalent to train|tram|subway.

◆ TransitRoutingPreference

Specifies preferences for transit routes.

Enumerator
lessWalking 

Indicates that the calculated route should prefer limited amounts of walking.

fewerTransfers 

Indicates that the calculated route should prefer a limited number of transfers.

◆ Units

Specifies the unit system to use when displaying results.

Enumerator
metric 

Specifies usage of the metric system. Textual distances are returned using kilometers and meters.

imperial 

Specifies usage of the Imperial (English) system. Textual distances are returned using miles and feet.

Member Function Documentation

◆ Find()

static OnlineMapsGoogleDirections OnlineMapsGoogleDirections.Find ( Params  p)
static

Creates a new request for a route search.

Parameters
pParameters of request.
Returns
Query instance to the Google API.

◆ GetResult()

static OnlineMapsGoogleDirectionsResult OnlineMapsGoogleDirections.GetResult ( string  response)
static

Converts the response string to a result object.

Parameters
responseResponse string
Returns
Result object