getDistance

fun getDistance(destination: Location, modes: EnumSet<Radar.RadarRouteMode>, units: Radar.RadarRouteUnits, callback: Radar.RadarRouteCallback)

Gets the device's current location, then calculates the travel distance and duration to a destination.

See also

Parameters

destination

The destination.

modes

The travel modes.

units

The distance units.

callback

A callback.

fun getDistance(destination: Location, modes: EnumSet<Radar.RadarRouteMode>, units: Radar.RadarRouteUnits, block: (status: Radar.RadarStatus, routes: RadarRoutes?) -> Unit)

Gets the device's current location, then calculates the travel distance and duration to a destination.

See also

Parameters

destination

The destination.

modes

The travel modes.

units

The distance units.

block

A block callback.

fun getDistance(origin: Location, destination: Location, modes: EnumSet<Radar.RadarRouteMode>, units: Radar.RadarRouteUnits, callback: Radar.RadarRouteCallback)

Calculates the travel distance and duration from an origin to a destination.

See also

Parameters

origin

The origin.

destination

The destination.

modes

The travel modes.

units

The distance units.

callback

A callback.

fun getDistance(origin: Location, destination: Location, modes: EnumSet<Radar.RadarRouteMode>, units: Radar.RadarRouteUnits, block: (status: Radar.RadarStatus, routes: RadarRoutes?) -> Unit)

Calculates the travel distance and duration from an origin to a destination.

See also

Parameters

origin

The origin.

destination

The destination.

modes

The travel modes.

units

The distance units.

block

A block callback.