transitRoute

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.

excludedModes

Specifies the mode of transport NOT to use when calculating distance.

departureTime

Specifies the departure time for real-time traffic calculations.

arrivalTime

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

ClientException

If the API returns a client error response

ServerException

If the API returns a server error response