getTolls

fun getTolls(origin: LatLng, destination: LatLng, mode: TransitMode? = null, language: String? = null, units: UnitSystem? = null, alternatives: Boolean? = null, waypoints: DistanceWaypoints? = null, method: Method? = null, departureTime: String? = null, arrivalTime: String? = null): List<DistanceRouteElementsResponse>

Performs an tolls request for distance using the Woosmap API.

Parameters

origin

The starting point.

destination

The ending point for the route.

mode

Specifies the mode of transport to use when calculating distance

language

The language code, indicating in which language the results should be returned, if possible. If language is not supplied, the Distance API service will use the navigator language or “en”.

units

Specifies the unit system parameter to use when expressing distance as text. Two different units supported: metric and imperial

alternatives

Specifies if alternative routes should be returned. default is false. Depending on the calculated route, alternatives may not be provided. alternatives and waypoints can not be used at the same time.

waypoints

A list of points by which the route should pass (route response is divided into legs, one leg corresponding to a route between two waypoints).

method

Specifies the method to compute the route between the start point and the end point: time - fastest route (default), distance - shortest route

departureTime

By using this parameter, Distance will calculate the duration with traffic Specifies the date/time at which to base the calculations on for traffic purposes.

arrivalTime

By using this parameter, Distance will calculate the duration with traffic Specifies the arrival date/time as a timestamp to base the calculation on