a!distanceBetween() Function

Returns the distance between the two locations (in meters) specified by the start and end coordinates. The distance is calculated by tracing a line between the two locations that follows the curvature of the Earth, and measuring the length of the resulting arc.

Syntax

a!distanceBetween( startLatitude, startLongitude, endLatitude, endLongitude )

startLatitude (Number (Decimal)): Latitude of the start location in degrees.

startLongitude (Number (Decimal)): Longitude of the start location in degrees.

endLatitude (Number (Decimal)): Latitude of the end location in degrees.

endLongitude (Number (Decimal)): Longitude of the end location in degrees.

Returns

Number (Decimal)

Notes

  • Valid range for latitude values is -90 and +90 degrees, specifying coordinates to the south and north of the equator respectively.
  • Valid range for longitude values is -180 and +180 degrees, specifying coordinates to the west and east of the Prime Meridian respectively.

Examples

a!distanceBetween(startLatitude: 38.932290, startLongitude: -77.218490, endLatitude: 38.917370, endLongitude: -77.220760) returns 1670.609

Open in Github Built: Fri, Mar 11, 2022 (04:59:07 PM)

On This Page

FEEDBACK