Package-level declarations

Contains models data classes for Distance API.

Types

Link copied to clipboard

enum for parameter Details of getRoute

Link copied to clipboard
open class DistanceBaseResponse(val status: DistanceStatus = DistanceStatus.InvalidRequest, val errorMessage: String? = null)
Link copied to clipboard
data class DistanceInstructions(val action: Int? = null, val summary: String? = null, val verbalAlert: String? = null, val verbalSuccint: String? = null, val verbalBefore: String? = null, val verbalAfter: String? = null)

Formatted instructions for this leg

Link copied to clipboard

Attributes describing a distance isochrone response.

Link copied to clipboard
data class DistanceIsochroneResponseIsoline(val origin: LatLng, val time: DistanceIsochroneResponseIsolineTime? = null, val distance: DistanceIsochroneResponseIsolineDistance? = null, val geometry: String)

Contains the properties of isoline

Link copied to clipboard
data class DistanceIsochroneResponseIsolineDistance(val value: Double? = null, val text: String? = null)

The distance of the isochrone (returned only if method=distance in parameters)

Link copied to clipboard
data class DistanceIsochroneResponseIsolineTime(val value: Double? = null, val text: String? = null)

The time of the isochrone (returned as default or when specifying method=time in parameters)

Link copied to clipboard
data class DistanceLeg(val distance: DistanceValue, val duration: DurationValue, val startLocation: LatLng, val endLocation: LatLng, val startWaypoint: Int, val endWaypoint: Int, val startAddress: String? = null, val endAddress: String? = null, val steps: List<DistanceStep>? = null)

Leg in a route

Link copied to clipboard
data class DistanceMatrixElementResponse(val status: DistanceMatrixElementResponse.Status? = null, val duration: DurationValue? = null, val distance: DistanceValue? = null)

Attributes describing an element of origin and destination returned in distance Matrix response.

Link copied to clipboard

Attributes describing elements of origin and destination returned in distance Matrix response.

Link copied to clipboard

Attributes describing an distance Matrix response.

Link copied to clipboard
data class DistanceRouteElementsResponse(val overviewPolyline: EncodedPolyline, val bounds: LatLngBounds, val notice: String, val legs: List<DistanceLeg>)

Attributes describing routes from an origin to a destination returned in distance route response.

Link copied to clipboard

Attributes describing a distance route response.

Link copied to clipboard

Returns more info on if the request was successful or not. * OK indicates the response contains a valid result. * INVALID_REQUEST indicates that the provided request was invalid (e.g. wrong URL syntax). * MAX_ELEMENTS_EXCEEDED indicates that the product of origins and destinations exceeds the per-query limit (fixed at 200 elts/q). * MAX_ROUTE_LENGTH_EXCEEDED indicates that at least one of requested route is too long and the matrix cannot be processed (>500km). * REQUEST_DENIED indicates that the service denied use of the Distance API service (e.g. wrong API Key, wrong/no referer, …). * BACKEND_ERROR indicates a Distance API request could not be processed due to a server error. This may indicate that the origin and/or destination of this pairing could not be matched to the network. The request may or may not succeed if you try again. * OVER_QUERY_LIMIT (associated to a 429 status code) indicates that the number of queries per second (QPS) or the number of elements per second (EPS) exceed the usage limits

Link copied to clipboard
data class DistanceStep(val distance: String, val duration: String, val polyline: String, val startLocation: LatLng, val endLocation: LatLng, val travelMode: String, val instructions: DistanceInstructions? = null)

step in a leg

Link copied to clipboard
data class DistanceValue(val value: Double? = null, val text: String? = null)

The total distance expressed in meters (value) and as text. The textual value uses the unit system specified with the units parameter of the original request.

Link copied to clipboard
data class DurationValue(val value: Double? = null, val text: String? = null)

The total duration to travel this route/leg, expressed in seconds (value) and as text. The textual value gives a structured string for duration in the specified language (if available).

Link copied to clipboard

enum for parameter elements of Matrix requests

Link copied to clipboard
data class EncodedPolyline(val points: String)

The polyline of the route (encoded with the poyline algorithm).

Link copied to clipboard
enum Method : Enum<Method>

enum for parameter Method

Link copied to clipboard

enum for Transit Mode

Link copied to clipboard

Specifies the unit system to use when expressing distance as text. Two different units supported: * metric (default) returns distances in kilometers and meters * imperial returns distances in miles and feet