esri.tasks.RouteParameters doesn't support returnZ

2069
3
05-28-2013 04:26 AM
FrankKönigstein
New Contributor
I'm working with a 3D network dataset and published a network analysis service with ArcGIS Server 10.1. I like to use the service within a web applikation using ArcGIS JavaScript API (Version 3.4). Therefore I like to use the z-Values.

Although the REST API already supports a parameter "returnZ" the JavaScript API doesn't:
http://resources.arcgis.com/en/help/rest/apiref/nasolve.html
http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/routeparameters.html
var routeTask = new esri.tasks.RouteTask(routeTaskURL);
var routeParams = new esri.tasks.RouteParameters();
routeParams.stops = new esri.tasks.FeatureSet();
routeParams.returnRoutes = true;
routeParams.returnDirections = true;
routeParams.returnZ = true;                                                           // ignored
routeParams.directionsLengthUnits = esri.Units.METERS;
routeParams.restrictionAttributes = ["none"];

routeTask.solve(routeParams);


When will the API support this parameter or is there a workaround?
0 Kudos
3 Replies
RobertoGallone
New Contributor II
Also in ArcGIS JavaScript API (Version 3.8)!?
0 Kudos
ReneRubalcava
Frequent Contributor
There are still parts of the REST API not implemented in the JS API yet, probably because of how they return results. You could try the setRequestPreCallback method advised for this similar situation in this thread. http://forums.arcgis.com/threads/95739-Why-isn-t-quot-returnDistinctValues-quot-an-option-for-the-qu...
0 Kudos
RobertoGallone
New Contributor II
Also in ArcGIS JavaScript API (Version 3.8)!?


Also in Version 3.9!?
0 Kudos