Directions - "totalLength" units of measure?

934
4
06-27-2014 06:46 AM
Highlighted
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)
Reply
0 Kudos
4 Replies
Highlighted
MVP Esteemed Contributor
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
Reply
0 Kudos
Highlighted
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)?
Reply
0 Kudos
Highlighted
MVP Esteemed Contributor
Firstly, if you are using the Network Analyst, you should be using projected data and not relying on projections-on-the-fly
Reply
0 Kudos
Highlighted
New Contributor II
Sorry, I don't understand your response!
I think I'm in the wrong forum... I'll repost this for Server.
Reply
0 Kudos