Class: ServiceAreaParameters

Description

Class added v2.0.

Input parameters for a ServiceAreaTask.

Note: ServiceAreaParameters, 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.  

Class hierarchy

esri.tasks.ServiceAreaParameters

Constructor

Constructor Description
esri.tasks.ServiceAreaParameters() Creates a new ServiceAreaParameters object.

Properties

Property Type Description
accumulateAttributes String[] The list of network attribute names to be accumulated with the analysis, i.e., which attributes should be returned as part of the response.
attributeParameterValues Object[] An array of attribute parameter values that can be used to determine which network elements can be used by a vehicle.
defaultBreaks Number[] An array of numbers defining the breaks. The default value is defined in the network analysis layer .
excludeSourcesFromPolygons String[] An array of network source names to NOT use when generating polygons.
facilities Object The set of facilities loaded as network locations during analysis. Can be either an instance of esri.tasks.DataLayer or esri.tasks.FeatureSet.
impedanceAttribute String The network attribute name used as the impedence attribute in analysis.
mergeSimilarPolygonRanges Boolean If true, similar ranges will be merged in the result polygons.
outputGeometryPrecision Number The precision of the output geometry after generalization.
outputGeometryPrecisionUnits String The units of the output geometry precision. The default value is esriUnknownUnits.
outputLines String The type of output lines to be generated in the result
outputPolygons String The type of output polygons to be generated in the result
outSpatialReference SpatialReference The well-known ID of the spatial reference for the geometries returned with the analysis results. If outSpatialReference is not specified, the geometries are returned in the spatial reference of the map.
overlapLines Boolean Indicates if the lines should overlap from multiple facilities. The default is defined by the network analysis layer in your ServiceAreaTask.
overlapPolygons Boolean Indicates if the polygons should overlap from multiple facilities. The default is defined by the network analysis layer in your ServiceAreaTask.
pointBarriers Object The set of point barriers loaded as network locations during analysis. Can be either an instance of esri.tasks.DataLayer or esri.tasks.FeatureSet.
polygonBarriers Object The set of polygons barriers loaded as network locations during analysis. Can be either an instance of esri.tasks.DataLayer or esri.tasks.FeatureSet.
polylineBarriers Object The set of polyline barriers loaded as network locations during analysis. Can be either an instance of esri.tasks.DataLayer or esri.tasks.FeatureSet.
restrictionAttributes String[] The list of network attribute names to be used as restrictions with the analysis
restrictUTurns String Specifies how U-Turns should be handled. The default is as defined in the specific routing network layer used in your RouteTask.See NAUTurn for a list of valid values.
returnFacilities Boolean If true, facilities will be returned with the analysis results. Default value is false.
returnPointBarriers Boolean If true, barriers will be returned in the barriers property of ClosestFacilitySolveResult. The default value is false.
returnPolygonBarriers Boolean If true, polygon barriers will be returned in the polygonBarriers property of ClosestFacilitySolveResult. The default value is false.
returnPolylineBarriers Boolean If true, polyline barriers will be returned in the polylineBarriers property of ClosestFacilitySolveResult. The default value is false.
splitLinesAtBreaks Boolean If true, lines will be split at breaks.
splitPolygonsAtBreaks Boolean If true, polygons will be split at breaks.
travelDirection String Options for traveling to or from the facility. Default values are defined by the newtork layer. See NATravelDirection for a list of valid values.
trimOuterPolygon Boolean If true, the outermost polygon (at the maximum break value) will be trimmed. The default is defined in the network analysis layer in your ServiceAreaTask.
trimPolygonDistance Number If polygons are being trimmed, provides the distance to trim. The default is defined in the network analysis layer.
trimPolygonDistanceUnits String If polygons are being trimmed, specifies the units of the trimPolygonDistance. The default is defined in the network analysis layer.
Constructor Detail

esri.tasks.ServiceAreaParameters()

Creates a new ServiceAreaParameters object.
Options:
<String> url URL to the ArcGIS Server REST resource that represents a network analysis service. Use the Service Directory to obtain the URL.
Code snippets:
params = new esri.tasks.ServiceAreaParameters();
params.defaultBreaks= [2];
params.outSpatialReference = map.spatialReference;
params.returnFacilities = false;
Properties Detail

<String[]> accumulateAttributes

The list of network attribute names to be accumulated with the analysis, i.e., which attributes should be returned as part of the response. The default is as defined in the specific routing network layer used in your RouteTask. You can specify any attributes names listed in the Service Directory under Network Dataset > Network Attributes as Usage Type: esriNAUTCost.

<Object[]> attributeParameterValues

A set of attribute parameter values that can be parameterized to determine which network elements can be used by a vehicle. The parameter holding a vehicle charactersitic is compared to a value coming from a descriptor attribute to determine whether or not a network element is traversible. For example, a parameterized restriction attribute can compare the height of your vehicle with a descriptor attribute that holds the clearance under overpasses through tunnels. If the vehicles height is greater than the clearance, the edge is restricted. Parameterized cost attributes that can reference other cost attributes and scale them, can also be used. This is useful when inclement weather like ice, fog or heavy rain, descends on the study area and hinders normal flow of traffic. By having a parameter already outfitted on a cost attribute, travel-time expectations and traversible network paths can be adjusted with respect to changes in traffic speeds.

<Number[]> defaultBreaks

An array of numbers defining the breaks. The default value is defined in the network analysis layer .
Code snippets:
params.defaultBreaks= [1,2];

<String[]> excludeSourcesFromPolygons

An array of network source names to NOT use when generating polygons. ExcludeSourcesFromPolygons specifies if certain network sources should be excluded from the service area polygon generation. A service area on a multi-modal network where only one mode is being used to compute the service area would get a more appropriate shape if other modes are excluded from the polygons.

<Object> facilities

The set of facilities loaded as network locations during analysis. Can be either an instance of esri.tasks.DataLayer or esri.tasks.FeatureSet.
Code snippets:
  var features = [];
  features.push(new esri.Graphic(inPoint,pointSymbol));
  var facilities = new esri.tasks.FeatureSet();
  facilities.features = features;
  paramsfacilities = facilities;

<String> impedanceAttribute

The network attribute name used as the impedence attribute in analysis.The default is as defined in the specific routing network layer used in your RouteTask. You can specify any attributes names listed in the Service Directory under Network Dataset > Network Attributes as Usage Type: esriNAUTCost. You can also specify a value of none to indicate that no network attributes should be used for impedance. If you specify an empty string, it will use the default of the service.

For example, set impedanceAttribute=Time for quickest route and impedanceAttribute=Length for shortest drive. Assuming the service has those two esriNAUTCost attributes.

View the Understanding the network attribute ArcGIS desktop help topic for more details.

<Boolean> mergeSimilarPolygonRanges

If true, similar ranges will be merged in the result polygons.

<Number> outputGeometryPrecision

The precision of the output geometry after generalization. If 0, no generalization of output geometry is performed. If present and positive, it represents the MaximumAllowableOffset parameter - generalization is performed according to IPolycurve.Generalize.

<String> outputGeometryPrecisionUnits

The units of the output geometry precision. The default value is esriUnknownUnits.

<String> outputLines

The type of output lines to be generated in the result. The default is as defined in the specific routing network layer used in your RouteTask. See NAOutputLine for a list of valid values.

<String> outputPolygons

The type of output polygons to be generated in the result. The default is as defined in the specific routing network layer used in your ServiceAreaTask. See NAOutputPolygon for a list of valid values.

<SpatialReference> outSpatialReference

The well-known ID of the spatial reference for the geometries returned with the analysis results. If outSpatialReference is not specified, the geometries are returned in the spatial reference of the map.

<Boolean> overlapLines

Indicates if the lines should overlap from multiple facilities. The default is defined by the network analysis layer in your ServiceAreaTask.

<Boolean> overlapPolygons

Indicates if the polygons should overlap from multiple facilities. The default is defined by the network analysis layer in your ServiceAreaTask.

<Object> pointBarriers

The set of point barriers loaded as network locations during analysis. Can be either an instance of esri.tasks.DataLayer or esri.tasks.FeatureSet.

<Object> polygonBarriers

The set of polygons barriers loaded as network locations during analysis. Can be either an instance of esri.tasks.DataLayer or esri.tasks.FeatureSet.

<Object> polylineBarriers

The set of polyline barriers loaded as network locations during analysis. Can be either an instance of esri.tasks.DataLayer or esri.tasks.FeatureSet.

<String[]> restrictionAttributes

The list of network attribute names to be used as restrictions with the analysis. The default is as defined in the specific routing network layer used in your RouteTask. Possible values are listed in the Service Directory under Network Dataset > Network Attributes. You can also specify a value of none to indicate that no network attributes should be used as restrictions. If you specify an empty array, it will default to the default of the service.
Code snippets:
Use restriction attributes
myRouteParams.restrictionAttributes = ["OneWay"];
Do not use the service defaults for restrictions:
myRouteParams.restrictionAttributes = ["none"];

<String> restrictUTurns

Specifies how U-Turns should be handled. The default is as defined in the specific routing network layer used in your RouteTask.See NAUTurn for a list of valid values.

<Boolean> returnFacilities

If true, facilities will be returned with the analysis results. Default value is false.

<Boolean> returnPointBarriers

If true, barriers will be returned in the barriers property of ClosestFacilitySolveResult. The default value is false.

<Boolean> returnPolygonBarriers

If true, polygon barriers will be returned in the polygonBarriers property of ClosestFacilitySolveResult. The default value is false.

<Boolean> returnPolylineBarriers

If true, polyline barriers will be returned in the polylineBarriers property of ClosestFacilitySolveResult. The default value is false.

<Boolean> splitLinesAtBreaks

If true, lines will be split at breaks.

<Boolean> splitPolygonsAtBreaks

If true, polygons will be split at breaks.

<String> travelDirection

Options for traveling to or from the facility. Default values are defined by the newtork layer. See NATravelDirection for a list of valid values.

<Boolean> trimOuterPolygon

If true, the outermost polygon (at the maximum break value) will be trimmed. The default is defined in the network analysis layer in your ServiceAreaTask.

<Number> trimPolygonDistance

If polygons are being trimmed, provides the distance to trim. The default is defined in the network analysis layer.

<String> trimPolygonDistanceUnits

If polygons are being trimmed, specifies the units of the trimPolygonDistance. The default is defined in the network analysis layer.