ServiceAreaParameters

require(["esri/tasks/support/ServiceAreaParameters"], function(ServiceAreaParameters) { /* code goes here */ });
Class: esri/tasks/support/ServiceAreaParameters
Inheritance: ServiceAreaParameters Accessor
Since: ArcGIS API for JavaScript 4.0

Input parameters for ServiceAreaTask.

ServiceAreaParameters, and other service area related classes, requires a service area layer. A service area layer is a layer of type esriNAServerServiceAreaLayer.

See also:

Constructors

new ServiceAreaParameters(properties)

Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
NameTypeSummary
String[]

The list of network attribute names to be accumulated with the analysis (i.e.

more details
more details
Object[]

A set of attribute parameter values that can be parameterized to determine which network elements can be used by a vehicle.

more details
more details
String

The name of the class.

more details
more details
Number[]

An array of numbers defining the breaks.

more details
more details
Boolean

When true, restricted network elements should be considered when finding network locations.

more details
more details
String[]

An array of network source names to NOT use when generating polygons.

more details
more details
DataLayer | FeatureSet

The set of facilities loaded as network locations during analysis.

more details
more details
String

The network attribute name used as the impedance attribute in analysis.

more details
more details
Boolean

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

more details
more details
Number

The precision of the output geometry after generalization.

more details
more details
String

The units of the output geometry precision.

more details
more details
String

The type of output lines to be generated in the result.

more details
more details
String

The type of output polygons to be generated in the result.

more details
more details
SpatialReference

The well-known ID of the spatial reference for the geometries returned with the analysis results.

more details
more details
Boolean

Indicates if the lines should overlap from multiple facilities.

more details
more details
Boolean

Indicates if the polygons should overlap from multiple facilities.

more details
more details
DataLayer | FeatureSet

The set of point barriers loaded as network locations during analysis.

more details
more details
DataLayer | FeatureSet

The set of polygon barriers loaded as network locations during analysis.

more details
more details
DataLayer | FeatureSet

The set of polyline barriers loaded as network locations during analysis.

more details
more details
String[]

The list of network attribute names to be used as restrictions with the analysis.

more details
more details
String

Specifies how U-turns should be handled.

more details
more details
Boolean

If true, facilities will be returned with the analysis results.

more details
more details
Boolean

If true, point barriers will be returned in the pointBarriers property of the analysis results.

more details
more details
Boolean

If true, polygon barriers will be returned in the polygonBarriers property of the analysis results.

more details
more details
Boolean

If true, polyline barriers will be returned in the polylineBarriers property of the analysis results.

more details
more details
Boolean

If true, lines will be split at breaks.

more details
more details
Boolean

If true, polygons will be split at breaks.

more details
more details
Date

Local date and time at the facility.

more details
more details
String

Options for traveling to or from the facility.

more details
more details
Boolean

If true, the outermost polygon (at the maximum break value) will be trimmed.

more details
more details
Number

If polygons are being trimmed, provides the distance to trim.

more details
more details
String

If polygons are being trimmed, specifies the units of trimPolygonDistance.

more details
more details
Boolean

When true, the hierarchy attributes for the network will be used in the analysis.

more details
more details

Property Details

accumulateAttributesString[]

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.

attributeParameterValuesObject[]

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 characteristic is compared to a value coming from a descriptor attribute to determine whether or not a network element is traversable. 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 vehicle's height is greater than the clearance, the edge is restricted.

Parameterized cost attributes that 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 traversable network paths can be adjusted with respect to changes in traffic speeds.

declaredClassStringreadonly

The name of the class. The declared class name is formatted as esri.folder.className.

defaultBreaksNumber[]

An array of numbers defining the breaks. The default value is defined in the network analysis layer.

doNotLocateOnRestrictedElementsBoolean

When true, restricted network elements should be considered when finding network locations.

Default Value: true

excludeSourcesFromPolygonsString[]

An array of network source names to NOT use when generating polygons. This property 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.

The set of facilities loaded as network locations during analysis. At ArcGIS Server 10.1, an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using DataFile. Note that either the features or url property should be specified.

impedanceAttributeString

The network attribute name used as the impedance attribute in analysis. The default is as defined in the routing network layer used in your RouteTask. You can specify any attribute 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.

mergeSimilarPolygonRangesBoolean

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

Default Value: false

outputGeometryPrecisionNumber

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 and generalization is performed according to IPolycurve.Generalize.

outputGeometryPrecisionUnitsString

The units of the output geometry precision.

Known Values: centimeters | decimal-degrees | decimeters | feet | inches | kilometers | meters | miles | millimeters | nautical-miles | points | yards

outputLinesString

The type of output lines to be generated in the result. The default is defined in the specific routing network layer used in your ServiceAreaTask.

Possible ValueDescription
noneNo lines are returned
straightOnly returns straight lines
true-shapeReturn the true shape of the lines
true-shape-with-measureReturn the true shape of the lines with their measurments

outputPolygonsString

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.

Possible Values: none | simplified | detailed

outSpatialReferenceSpatialReference

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 view.

overlapLinesBoolean

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

Default Value: false

overlapPolygonsBoolean

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

Default Value: false

pointBarriersDataLayer|FeatureSet

The set of point barriers loaded as network locations during analysis. At ArcGIS Server 10.1, an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using DataFile. Note that either the features or url property should be specified.

polygonBarriersDataLayer|FeatureSet

The set of polygon barriers loaded as network locations during analysis. At ArcGIS Server 10.1, an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using DataFile. Note that either the features or url property should be specified.

polylineBarriersDataLayer|FeatureSet

The set of polyline barriers loaded as network locations during analysis. At ArcGIS Server 10.1, an optional url property was added. Use this property to specify a REST query request to a Feature, Map or GP Service that returns a JSON feature set. The url property can be specified using DataFile. Note that either the features or url property should be specified.

restrictionAttributesString[]

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. You can specify any attributes names listed in the Service Directory under Network Dataset > Network Attributes as Usage Type: esriNAUTCost.

restrictUTurnsString

Specifies how U-turns should be handled. The default is defined in the routing network layer used in your RouteTask.

Possible ValueDescription
allow-backtrackAllows U-turns on everywhere
at-dead-ends-onlyOnly allows U-turns at dead ends
no-backtrackRestricts U-turns everywhere
at-dead-ends-and-intersectionsOnly allows U-turns at dead ends and intersections

returnFacilitiesBoolean

If true, facilities will be returned with the analysis results.

Default Value: false

returnPointBarriersBoolean

If true, point barriers will be returned in the pointBarriers property of the analysis results.

Default Value: false

returnPolygonBarriersBoolean

If true, polygon barriers will be returned in the polygonBarriers property of the analysis results.

Default Value: false

returnPolylineBarriersBoolean

If true, polyline barriers will be returned in the polylineBarriers property of the analysis results.

Default Value: false

splitLinesAtBreaksBoolean

If true, lines will be split at breaks.

Default Value: false

splitPolygonsAtBreaksBoolean

If true, polygons will be split at breaks.

Default Value: false

timeOfDayDate

Local date and time at the facility. if travelDirection = "esriNATravelDirectionToFacility", the timeOfDay value specifies arrival time at the facility. if travelDirection = "esriNATravelDirectionFromFacility", timeOfDay specifies departure time from the facility. Requires ArcGIS Server service version 10.1 or greater.

travelDirectionString

Options for traveling to or from the facility. Default values are defined by the network layer.

Possible ValueDescription
from-facilitySets travel direction from the facility
to-facilitySets travel direction to the facility

trimOuterPolygonBoolean

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.

Default Value: false

trimPolygonDistanceNumber

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

trimPolygonDistanceUnitsString

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

useHierarchyBoolean

When true, the hierarchy attributes for the network will be used in the analysis. The default value is defined in the network layer. useHierarchy cannot be used in conjunction with outputLines. Requires an ArcGIS Server service version 10.1 or greater.

Method Overview

NameReturn TypeSummary
Object

Converts an instance of this class to its ArcGIS Portal JSON representation.

more details
more details

Method Details

toJSON(){Object}

Converts an instance of this class to its ArcGIS Portal JSON representation. See the Using fromJSON() topic in the Guide for more information.

Returns:
TypeDescription
ObjectThe ArcGIS Portal JSON representation of an instance of this class.

API Reference search results

NameTypeModule

There were no match results from your search criteria.