I hava a problem when i use the sample code of directions,i just change the map service and the route service to my own.
and the spatialReference of my mapservice is 4326 and my networkService's is 3857.
The code below may has a bug:
var routeResult:RouteResult = event.routeSolveResult.routeResults[0];
directionsFS = routeResult.directions;
map.defaultGraphicsLayer.add(new Graphic(directionsFS.mergedGeometry, routeSymbol));
directionsFS.mergedGeometry,this variable doesn't return the real shape of the route,then I edit the code like this:
var route:Graphic=routeResult.route;
map.defaultGraphicsLayer.add(new Graphic(route.geometry, routeSymbol));
The code above is correct,route.geometry returns the real shape of the Route,Why they are different.
I find if the spatialReference of the map and the networkService's are same,there is no this problem or can Ignore this problem.
Why?If i want to use different SpatialReference ,How to do?