dojo.require("esri.tasks.ClosestFacilitySolveResult")
Description
(Added at v2.0)
The result from a ClosestFacilityTask operation.
Note: ClosestFacilitySolveResult, and other closest facility related classes, requires ArcGIS Server 10.0 or above and a closest facility layer. A closest facility layer is a layer of type esriNAServerClosestFacilityLayer.
Samples
Search for
samples that use this class.
Properties
Property Details
An array of directions. A direction is an instance of esri.tasks.DirectionFeatureSest. Route directions are returned if returnDirections was set to true, the default is false.
Sample:
var directions = solveResult.directions;
An array of points, only returned when ClosestFacilityParameters.returnFacilities is true.
An array of points, only returned when ClosestFacilityParameters.returnIncidents is true.
Message received when the solve is complete. If a closest facility cannot be solved, the message returned by the server identifies the incident that could not be solved.
The point barriers are an array of points. They are returned only if ClosestFacilityParameters.returnPointBarriers was set to true (which is not the default). If you send in the point barriers as a featureSet (instead of using DataLayer), you already have the barriers and might not need to request them back from the server.
The polygon barriers are an array of polygons. They are returned only if ClosestFacilityParameters.returnPolygonBarriers was set to true (which is not the default). If you send in the polygon barriers as a featureSet (instead of using DataLayer), you already have the barriers and might not need to request them back from the server.
The polyline barriers are an array of polylines. They are returned only if ClosestFacilityParameters.returnPolylineBarriers was set to true (which is not the default). If you send in the polyline barriers as a featureSet (instead of using DataLayer), you already have the barriers and might not need to request them back from the server.
The array of routes. Route graphics are returned if returnRoutes is true and outputLines does not equal esriNAOutputLineNone. From version 2.0 to 2.5 the type is an array of Polylines. At version 2.6 the type is an array of Graphics.
Sample:
closestFacilityTask.solve(params,function(solveResult){
dojo.forEach(solveResult.routes,function(route,index){
routeGraphicLayer.add(route);
});