Skip to main content
Location values contain a latitude and longitude pair. Device-specific coordinates are covered under special functions.

Distance

Calculates the surface distance between two locations.
  • Syntax: Distance(first, second[, unit])
  • Requires: two Location values. The optional unit is "m", "km", or "mi"; metres are used by default.
  • Returns: Numeric distance in the selected unit.
  • Best for: service radiuses, route triage, and proximity checks.

Latitude

Returns the latitude component of a location.
  • Syntax: Latitude(location)
  • Requires: a Location value.
  • Returns: Numeric latitude.
  • Best for: mapping integrations and coordinate exports.

Longitude

Returns the longitude component of a location.
  • Syntax: Longitude(location)
  • Requires: a Location value.
  • Returns: Numeric longitude.
  • Best for: mapping integrations and coordinate exports.

ToLocation

Creates a location from coordinate text or from separate latitude and longitude numbers.
  • Syntax: ToLocation(text) or ToLocation(latitude, longitude)
  • Requires: coordinate text, or a latitude from -90 to 90 and longitude from -180 to 180.
  • Returns: Location.
  • Best for: imported GPS data and calculated coordinates.
Keep coordinates as a Location value while calculating. Extract latitude or longitude only at an integration boundary.
Last modified on September 7, 2026