transit Route
fun transitRoute(origin: LatLng, destination: LatLng, modes: List<TransitTravelMode>? = null, excludedModes: List<TransitTravelMode>? = null, departureTime: String? = null, arrivalTime: String? = null): TransitRouteResponse
Performs an tolls request for transit route using the Woosmap API.
Return
TransitRouteResponse
Parameters
origin
The starting point in latitude/longitude coordinates.
destination
The ending point in latitude/longitude coordinates.
modes
Specifies the mode of transport to use when calculating distance.
excluded Modes
Specifies the mode of transport NOT to use when calculating distance.
departure Time
Specifies the departure time for real-time traffic calculations.
arrival Time
Specifies the arrival time. Use either arrivalTime or departureTime, not both.
Throws
If the request is not correctly configured
Rethrows the OkHttp execute method exception
If the API returns an informational or redirection response
Client Exception
If the API returns a client error response
Server Exception
If the API returns a server error response