distanceTo

Calculates the distance (measured in meters) from the current object’s coordinate to the specified coordinate. This uses the Haversine formula to account for global curvature.

Here we don't use Android default location.distanceTo(other.location) because it gives a bit different results comparing to iOS and Backend

Return

The distance (in meters) between the two coordinates. Null if coordinates are at different levels.

Parameters

other

The destination coordinate.