Calculate Distance Between Longitude and Latitude

A Delphi function that will calculate the distance (as the crow flies) between two longitude / latitude points.

Using DistanceBetweenLonLat:

Parameters:

Lat1: A floating point value containing the latitude part of the first point.

Lon1: A floating point value containing the longitude part of the first point.

Lat2: A floating point value containing the latitude part of the second point.

Lon2: A floating point value containing the longitude part of the second point.

Return Value:

The function will return a floating point value, representing the distance in miles between the two points specified.

Example: