This article explains how to use our unique DISTANCE() functions in combination with the Place element
We have created powerful bespoke functions that allow you to calculate with the outputs of the Place-question. The following functions are now available:
These functions were already available in the background of our Places-question. The DISTANCE functions will give you more flexibility.
The distance function returns the distance between two coordinates (places) in a selected unit (as the crow flies). A coordinate contains the latitude & longitude, giving the DISTANCE function a total of 5 arguments:
DISTANCE(lat1, lng1, lat2, lng2, unit)
'lat1': the latitude of the first place
'lng1': the longitude of the first place
'lat2': the latitude of the second place
'lng2': the longitude of the first place
'unit': The unit in which you want to express the output. Available units: "m", "ft", "km", "mi", "in" (default "m"). Make sure you include quotation marks around the unit since the function will otherwise throw an error.
You can either use raw longitude and latitude data or use the lat and lng from a Place-question: