AnsweredAssumed Answered

Get distance from source to destination via way-points

Question asked by prakash.mani@fr8.in on Oct 30, 2017
Latest reply on Oct 31, 2017 by jsandhu-esristaff

I am using asynchronous routing service to find the distance between source and destination via way-points. When I give way-points, I am getting different value in the Total_Kilometers(83) field but the actual distance is only 33 KM. Can someone please tell to get the actual distance from source to destination via way-points?

 

Request:

{
"type": "features",
"LocationType": "1",
"features": [{
"geometry": {
"x": 80.1604766845703,
"y": 13.0624952316284
}
},
{
"geometry": {
"x": 80.1640701293945,
"y": 13.1163520812988
}
},
{
"geometry": {
"x": 80.2768020629883,
"y": 13.218768119812
}
},
{
"geometry": {
"x": 80.0792617797852,
"y": 12.8535680770874
}
}
]
}

 

Response:

{
"paramName": "Output_Routes",
"dataType": "GPFeatureRecordSetLayer",
"value": {
"displayFieldName": "",
"geometryType": "esriGeometryPolyline",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
...
...
"features": [{
"attributes": {
"OID": 1,
"Name": "Location 1 - Location 4",
"StopCount": 4,
"Total_Minutes": 124.55307562869066,
"Total_Kilometers": 83.201435897857806,
"FirstStopOID": 1,
"LastStopOID": 4,
"Total_Miles": 51.698979999999999,
"Shape_Length": 0.75629657258452343
},
...

Outcomes