FunctionsCopy link to clipboard
a!distanceBetween( startLatitude, startLongitude, endLatitude, endLongitude )
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.
ParametersCopy link to clipboard
Keyword | Type | Description |
---|---|---|
|
Number (Decimal) |
Latitude of the start location in degrees. |
|
Number (Decimal) |
Longitude of the start location in degrees. |
|
Number (Decimal) |
Latitude of the end location in degrees. |
|
Number (Decimal) |
Longitude of the end location in degrees. |
ReturnsCopy link to clipboard
Number (Decimal)
Usage considerationsCopy link to clipboard
- 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.
ExamplesCopy link to clipboard
a!distanceBetween(startLatitude: 38.932290, startLongitude: -77.218490, endLatitude: 38.917370, endLongitude: -77.220760)
returns 1670.609