GetDistance method

Unofficial Content

Gets the distance in meters between two locations.


Name Type Description
FromLocation Geolocation domain Specifies the first of the two locations to calculate the distance.
ToLocation Geolocation domain  Specifies the second location to calculate the distance between.

Return value

  • Distance:
    type: Numeric
    The distance between the two location points in meters.


  • The result might differ on each platform because they use different reference models provided by its built-in functions.
    If it is critical to get the same result, the developers can write their own function. 

Code samples