Calculates the distance between 2 sets of coordinates expressed as Double values in the unit selected.

Namespace: Reimers.Google.Map.Accessories
Assembly: Reimers.Google.Map (in Reimers.Google.Map.dll) Version: 5.3.95.699 (5.3.95.699)

Syntax

C#
public static double Distance(
	double startLatitude,
	double startLongitude,
	double finishLatitude,
	double finishLongitude,
	Units unit
)

Parameters

startLatitude
Type: System..::..Double
A Double value.
startLongitude
Type: System..::..Double
A Double value.
finishLatitude
Type: System..::..Double
A Double value.
finishLongitude
Type: System..::..Double
A Double value.
unit
Type: Reimers.Core.Maps..::..Units
A Units.

Return Value

Returns a Double value giving the distance between the Start and Finish.

Remarks

The distance is calculated as the length of a great circle between 2 point. The distance calculation is based on the mean radius of the Earth. As such the calculation is not accurate for all points of the Earth. The distance should be used only as an indication and should never be used in navigation.

See Also