float LocationDistanceBetween(float lat1, float lng1, float lat2, float lng2);
Returns the distance (in meters) between two points on the globe.
Returns a non-zero value if the call was successful, zero otherwise.
The latitude of the first point to which you wish to calculate distance.
The longitude of the first point to which you wish to calculate distance.
The latitude of the second point to which you wish to calculate distance.
The longitude of the second point to which you wish to calculate distance.
LocationDistanceBetween() returns the distance (in meters) between two discrete points on the globe. Each point is specified by a pair of floating point values representing latitude and longitude.
NOTE: this function is effective on the device only.
Available in DragonFireSDK 1.4 and later.
MyFont = FontAdd("Helvetica", "Regular", 24, 0x00FF00);
Dist = LocationDistanceBetween(37.33294444f, -122.0325556f, 0.0f, 0.0f);
sprintf(TextBuffer, "Cupertino to Equator: %fm", Dist);
TextAdd(10, 10, TextBuffer, MyFont);