Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: ServiceAreaSolveResult

require(["esri/tasks/ServiceAreaSolveResult"], function(ServiceAreaSolveResult) { /* code goes here */ });

Description

(Added at v2.0)
The result from a ServiceAreaTask operation.

Note: ServiceAreaSolveResult, and other service area related classes, requires ArcGIS Server 10.0 or above and a service area layer. A service area layer is a layer of type esriNAServerServiceAreaLayer.

Samples

Search for samples that use this class.

Properties

NameTypeSummary
facilitiesPoint[]Array of points, only returned if ServiceAreaParameters.returnFacilities is set to true.
messagesNAMessage[]Message received when solve is completed.
pointBarriersPoint[]The point barriers are an array of points.
polygonBarriersPolygon[]The polygon barriers are an array of polygons.
polylineBarriersPolyline[]The polyline barriers are an array of polylines.
serviceAreaPolygonsGraphic[]Array of service area polygon graphics.
serviceAreaPolylinesGraphic[]Array of service area polyline graphics.
Property Details

<Point[]> facilities

Array of points, only returned if ServiceAreaParameters.returnFacilities is set to true.

<NAMessage[]> messages

Message received when solve is completed. If a service area cannot be solved, the message returned by the server identifies the incident that could not be solved.

<Point[]> pointBarriers

The point barriers are an array of points. They are returned only if ServiceAreaParameters.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.

<Polygon[]> polygonBarriers

The polygon barriers are an array of polygons. They are returned only if ServiceAreaParameters.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.

<Polyline[]> polylineBarriers

The polyline barriers are an array of polylines. They are returned only if ServiceAreaParameters.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.

<Graphic[]> serviceAreaPolygons

Array of service area polygon graphics. From version 2.0 to 2.5 the type was an array of Polygons. At version 2.6 the type is now an array of Graphics.
Sample:
serviceAreaTask.solve(params,function(serviceAreaSolveResult){
  var result = serviceAreaSolveResult;
  dojo.forEach(serviceAreaSolveResult.serviceAreaPolygons,function(graphic){
    map.graphics.add(graphic);
  });
});

<Graphic[]> serviceAreaPolylines

Array of service area polyline graphics. From version 2.0 to 2.5 the type was an array of Polylines. At version 2.6 the type is now an array of Graphics.
Show Modal