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...
|
| enum | Avoid { none
, tolls
, highways
, ferries
} |
| | Indicates that the calculated route(s) should avoid the indicated features. More...
|
| |
| enum | Mode { driving
, walking
, bicycling
, transit
} |
| | Mode of transport to use when calculating directions. More...
|
| |
| enum | TrafficModel { bestGuess
, pessimistic
, optimistic
} |
| | Specifies the assumptions to use when calculating time in traffic. More...
|
| |
| enum | TransitMode {
bus = 1
, subway = 2
, train = 4
, tram = 8
,
rail = 16
} |
| | Specifies one or more preferred modes of transit. More...
|
| |
| enum | TransitRoutingPreference { lessWalking
, fewerTransfers
} |
| | Specifies preferences for transit routes. More...
|
| |
| enum | Units { metric
, imperial
} |
| | Specifies the unit system to use when displaying results. More...
|
| |
|
|
Params | requestParams |
| | Request parameters.
|
| |
|
Action< string > | OnComplete |
| | Event that occurs when a response is received from webservice.
|
| |
|
new Action< OnlineMapsTextWebService > | OnFailed |
| | Event that occurs when an error response is received from webservice.
|
| |
|
new Action< OnlineMapsTextWebService > | OnFinish |
| | This event is occurs after other events, before disposing the request.
|
| |
|
new Action< OnlineMapsTextWebService > | OnSuccess |
| | Event that occurs when a success response is received from webservice.
|
| |
|
Action< OnlineMapsWebServiceAPI > | OnFailed |
| | Event that occurs when an error response is received from webservice.
|
| |
|
Action< OnlineMapsWebServiceAPI > | OnFinish |
| | Event that occurs after OnComplete, when the response from webservice processed.
|
| |
|
Action< OnlineMapsWebServiceAPI > | OnDispose |
| | Event that occurs when the current request instance is disposed.
|
| |
|
Action< OnlineMapsWebServiceAPI > | OnSuccess |
| | Event that occurs when a success response is received from webservice.
|
| |
|
object | customData |
| | In this variable you can put any data that you need to work with requests.
|
| |
|
|
void | OnRequestComplete (OnlineMapsWWW www) |
| | Checks whether the response from webservice.
|
| |
|
string | _response |
| | Response string.
|
| |
| string | response [get] |
| | Gets a response from webservice.
|
| |
| OnlineMapsQueryStatus | status [get] |
| | Gets the current status of the request to webservice.
|
| |
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.
◆ 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.
|
◆ OnlineMapsGoogleDirections()
| OnlineMapsGoogleDirections.OnlineMapsGoogleDirections |
( |
string | key, |
|
|
object | origin, |
|
|
object | destination ) |
Constructor.
- Parameters
-
| key | Google API key |
| origin | The address (string), coordinates (Vector2, OnlineMapsVector2d), or place ID (string prefixed with place_id:) from which you wish to calculate directions. |
| destination | The address (string), coordinates (Vector2, OnlineMapsVector2d), or place ID (string prefixed with place_id:) to which you wish to calculate directions. |
◆ Find()
Creates a new request for a route search.
- Parameters
-
- Returns
- Query instance to the Google API.
◆ GetResult()
Converts the response string to a result object.
- Parameters
-
- Returns
- Result object