Location.DistanceTo(Location) Method

Definition

Returns the approximate distance in meters between this location and the given location.

[Android.Runtime.Register("distanceTo", "(Landroid/location/Location;)F", "GetDistanceTo_Landroid_location_Location_Handler")]
public virtual float DistanceTo (Android.Locations.Location dest);
[<Android.Runtime.Register("distanceTo", "(Landroid/location/Location;)F", "GetDistanceTo_Landroid_location_Location_Handler")>]
abstract member DistanceTo : Android.Locations.Location -> single
override this.DistanceTo : Android.Locations.Location -> single

Parameters

dest
Location

the destination location

Returns

the approximate distance in meters

Attributes

Remarks

Returns the approximate distance in meters between this location and the given location. Distance is defined using the WGS84 ellipsoid.

Java documentation for android.location.Location.distanceTo(android.location.Location).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to