open class DirectionRequest
The class for assign the addition parameter for the request and request execution.
Since
1.0.0
DirectionRequest(apiKey: String, origin: LatLng, destination: LatLng, waypointList: MutableList<LatLng>) |
open fun alternativeRoute(alternative: Boolean): DirectionRequest
Specifies whether require the alternative route result of the request. |
|
open fun avoid(avoid: String): DirectionRequest
Assign the route restriction to avoid of the request. |
|
open fun departureTime(time: String): DirectionRequest
Assign the departure time of the request. |
|
open fun execute(callback: DirectionCallback): DirectionTask
Require the optimized waypoint by reorder the waypoint in result. |
|
open fun language(language: String): DirectionRequest
Assign the language of the request. |
|
open fun optimizeWaypoints(optimize: Boolean): DirectionRequest
Specifies whether require the optimized waypoint by reorder the waypoint in result. |
|
open fun trafficMode(trafficModel: String): DirectionRequest
Specifies the assumptions to use when calculating time in traffic. |
|
open fun transitMode(transitMode: String): DirectionRequest
Assign the transit mode of the request. |
|
open fun transitRoutingPreference(transitRoutingPreference: String): DirectionRequest
Specifies preferences for transit routes. Using this parameter, you can bias the options returned, rather than accepting the default best route chosen by the API. |
|
open fun transportMode(transportMode: String): DirectionRequest
Assign the transport mode of the request. |
|
open fun unit(unit: String): DirectionRequest
Assign the unit of the request. |
fun DirectionRequest.execute(onDirectionSuccess: (Direction?) -> Unit = null, onDirectionFailure: (Throwable) -> Unit = null): DirectionTask
Kotlin extension method for direction request execution. |