Directions - "totalLength" units of measure?

1278
4
06-27-2014 06:46 AM
Sa_EdA_Rafat
New Contributor II
Hi all,

Does anyone know where the units-of-measure of the "totalLength" is specified?
This seems to be in meters even though my layer says it in Miles ("directionsLengthUnits": "esriNAUMiles").

json["directions"];
{[
{
"routeId": 1,
"routeName": "Location 1 - Location 2",
"hasM": true,
"summary": {
"totalLength": 5221.98296067188,
"totalTime": 4.41884235246107,
"totalDriveTime": 4.4188423535129635,
"envelope": {
"xmin": -87.652578690999917,
"ymin": 41.878818755651714,
"xmax": -87.6294279999999,
"ymax": 41.903987605323444,
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
}
}
},
Tags (2)
0 Kudos
4 Replies
DanPatterson_Retired
MVP Emeritus
Are you sure that NA does the conversion for you?  I think the units are in the units of the coordinate system, ergo, if the projection has metric units, then it should be in meters
0 Kudos
Sa_EdA_Rafat
New Contributor II
Are you sure that NA does the conversion for you?  I think the units are in the units of the coordinate system, ergo, if the projection has metric units, then it should be in meters


I measured the distance - the value is in meters.
My data is in WGS84, is meters the default unit of measure (not decimal degrees)?
0 Kudos
DanPatterson_Retired
MVP Emeritus
Firstly, if you are using the Network Analyst, you should be using projected data and not relying on projections-on-the-fly
0 Kudos
Sa_EdA_Rafat
New Contributor II
Sorry, I don't understand your response!
I think I'm in the wrong forum... I'll repost this for Server.
0 Kudos