Select to view content in your preferred language

calculate distance between 2 coordinates returned by PositionSource

708
1
Jump to solution
08-26-2020 03:02 AM
rsharma
Frequent Contributor

Hi i want to calculate distance betweeen 2 coordinates returned one after other to calculate distance between them.

I found distanceTo() function , but didn't get any example. how to use it

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

There is the GeometryEngine distance method and the distanceGeodetic method. Distance will give you simple planar distance and distanceGeodetic will give you a more accurate distance - GeometryEngine QML Type | ArcGIS for Developers 

Here is an example arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_QMLSamples/Geometry/GeodesicOperations at master · Esri... 

View solution in original post

1 Reply
LucasDanzinger
Esri Frequent Contributor

There is the GeometryEngine distance method and the distanceGeodetic method. Distance will give you simple planar distance and distanceGeodetic will give you a more accurate distance - GeometryEngine QML Type | ArcGIS for Developers 

Here is an example arcgis-runtime-samples-qt/ArcGISRuntimeSDKQt_QMLSamples/Geometry/GeodesicOperations at master · Esri...