distance

open fun distance(point1: LatLng, point2: LatLng, df: LatLongPosition.DistanceFormula): Double(source)

Distance between two points.

Return

the distance in the chosen unit of measure.

Parameters

point1

the first point.

point2

the second point.

df

the formula to use to compute distances


open fun distance(point1: LatLng, point2: LatLng, unit: LengthUnit, df: LatLongPosition.DistanceFormula): Double(source)

Distance between two points with arbitrary LengthUnit.

Return

the distance in the chosen unit of measure.

Parameters

point1

the first point.

point2

the second point.

unit

the unit of measure in which to receive the result.

df

the formula to use to compute distances