AnsweredAssumed Answered

Getting the coordinates of the closest facility

Question asked by yo_haha on Apr 27, 2012
Latest reply on Jul 9, 2016 by JColl.KU
Hello,
I have published a Network Analyst Service that calculates the closest facility (of Point type) to the click performed on the map. I would like to get the coordinates of that Point.
I tried to do that by exploring the property "facilities" of the solveResult object, but it seems that "facilities" contains all the elements of the layer where the closest facility is calculated.
Do you have any hint?

closestFacilityTask.solve(params,function(solveResult){
var vente = new esri.Graphic(solveResult.facilities[0]);
venteGraphicsLayer.add(vente);
});


Regards.

Outcomes