ServiceAreaParameters
require(["esri/tasks/support/ServiceAreaParameters"], function(ServiceAreaParameters) { /* code goes here */ });
esri/tasks/support/ServiceAreaParameters
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
.
Constructors
- new ServiceAreaParameters(properties)
- Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
String[] | The list of network attribute names to be accumulated with the analysis (i.e. more details | more details | ServiceAreaParameters | |
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 | ServiceAreaParameters | |
String | The name of the class. more details | more details | Accessor | |
Number[] | An array of numbers defining the breaks. more details | more details | ServiceAreaParameters | |
Boolean | When | more details | ServiceAreaParameters | |
String[] | An array of network source names to NOT use when generating polygons. more details | more details | ServiceAreaParameters | |
DataLayer|FeatureSet | The set of facilities loaded as network locations during analysis. more details | more details | ServiceAreaParameters | |
String | The network attribute name used as the impedance attribute in analysis. more details | more details | ServiceAreaParameters | |
Boolean | If | more details | ServiceAreaParameters | |
Number | The precision of the output geometry after generalization. more details | more details | ServiceAreaParameters | |
String | The units of the output geometry precision. more details | more details | ServiceAreaParameters | |
String | The type of output lines to be generated in the result. more details | more details | ServiceAreaParameters | |
String | The type of output polygons to be generated in the result. more details | more details | ServiceAreaParameters | |
SpatialReference | The well-known ID of the spatial reference for the geometries returned with the analysis results. more details | more details | ServiceAreaParameters | |
Boolean | Indicates if the lines should overlap from multiple facilities. more details | more details | ServiceAreaParameters | |
Boolean | Indicates if the polygons should overlap from multiple facilities. more details | more details | ServiceAreaParameters | |
DataLayer|FeatureSet | The set of point barriers loaded as network locations during analysis. more details | more details | ServiceAreaParameters | |
DataLayer|FeatureSet | The set of polygon barriers loaded as network locations during analysis. more details | more details | ServiceAreaParameters | |
DataLayer|FeatureSet | The set of polyline barriers loaded as network locations during analysis. more details | more details | ServiceAreaParameters | |
String[] | The list of network attribute names to be used as restrictions with the analysis. more details | more details | ServiceAreaParameters | |
String | Specifies how U-turns should be handled. more details | more details | ServiceAreaParameters | |
Boolean | If | more details | ServiceAreaParameters | |
Boolean | If | more details | ServiceAreaParameters | |
Boolean | If | more details | ServiceAreaParameters | |
Boolean | If | more details | ServiceAreaParameters | |
Boolean | If | more details | ServiceAreaParameters | |
Boolean | If | more details | ServiceAreaParameters | |
Date | Local date and time at the facility. more details | more details | ServiceAreaParameters | |
String | Options for traveling to or from the facility. more details | more details | ServiceAreaParameters | |
String | Travel modes define how a pedestrian, car, truck or other medium of transportation moves through the street network. more details | more details | ServiceAreaParameters | |
Boolean | If | more details | ServiceAreaParameters | |
Number | If polygons are being trimmed, provides the distance to trim. more details | more details | ServiceAreaParameters | |
String | If polygons are being trimmed, specifies the units of trimPolygonDistance. more details | more details | ServiceAreaParameters | |
Boolean | When | more details | ServiceAreaParameters |
Property Details
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
asUsage Type: esriNAUTCost
.
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.
- Since: ArcGIS API for JavaScript 4.7
The name of the class. The declared class name is formatted as
esri.folder.className
.
An array of numbers defining the breaks. The default value is defined in the network analysis layer.
- doNotLocateOnRestrictedElements Boolean
When
true
, restricted network elements should be considered when finding network locations.
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.
- impedanceAttribute String
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
asUsage Type: esriNAUTCost
. You can also specify a value ofnone
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 andimpedanceAttribute = '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.
- mergeSimilarPolygonRanges Boolean
If
true
, similar ranges will be merged in the resulting polygons.- Default Value:false
- outputGeometryPrecision Number
The precision of the output geometry after generalization. If
0
, no generalization of output geometry is performed. If present and positive, it represents theMaximumAllowableOffset
parameter and generalization is performed according to IPolycurve.Generalize.
- outputGeometryPrecisionUnits String
The units of the output geometry precision.
Possible Values:"centimeters"|"decimal-degrees"|"decimeters"|"feet"|"inches"|"kilometers"|"meters"|"miles"|"millimeters"|"nautical-miles"|"points"|"yards"
- outputLines String
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 Value Description none No lines are returned straight Only returns straight lines true-shape Return the true shape of the lines true-shape-with-measure Return the true shape of the lines with their measurements Possible Values:"none"|"straight"|"true-shape"|"true-shape-with-measure"
- outputPolygons String
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"
- 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 view.
- overlapLines Boolean
Indicates if the lines should overlap from multiple facilities. The default is defined by the network analysis layer in your ServiceAreaTask.
- Default Value:false
- overlapPolygons Boolean
Indicates if the polygons should overlap from multiple facilities. The default is defined by the network analysis layer in your ServiceAreaTask.
- Default Value:false
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.
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.
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.
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
asUsage Type: esriNAUTCost
.
- restrictUTurns String
Specifies how U-turns should be handled. The default is defined in the routing network layer used in your RouteTask.
Possible Value Description allow-backtrack Allows U-turns on everywhere at-dead-ends-only Only allows U-turns at dead ends no-backtrack Restricts U-turns everywhere at-dead-ends-and-intersections Only allows U-turns at dead ends and intersections Possible Values:"allow-backtrack"|"at-dead-ends-only"|"no-backtrack"|"at-dead-ends-and-intersections"
- returnFacilities Boolean
If
true
, facilities will be returned with the analysis results.- Default Value:false
- returnPointBarriers Boolean
If
true
, point barriers will be returned in the pointBarriers property of the analysis results.- Default Value:false
- returnPolygonBarriers Boolean
If
true
, polygon barriers will be returned in the polygonBarriers property of the analysis results.- Default Value:false
- returnPolylineBarriers Boolean
If
true
, polyline barriers will be returned in the polylineBarriers property of the analysis results.- Default Value:false
- splitLinesAtBreaks Boolean
If
true
, lines will be split at breaks.- Default Value:false
- splitPolygonsAtBreaks Boolean
If
true
, polygons will be split at breaks.- Default Value:false
- timeOfDay Date
Local date and time at the facility. If
travelDirection = "to-facility"
, thetimeOfDay
value specifies arrival time at the facility. iftravelDirection = "from-facility"
,timeOfDay
specifies departure time from the facility. Requires ArcGIS Server service version 10.1 or greater.
- travelDirection String
Options for traveling to or from the facility. Default values are defined by the network layer.
Possible Value Description from-facility Sets travel direction from the facility to-facility Sets travel direction to the facility Possible Values:"from-facility"|"to-facility"
- travelMode String
Travel modes define how a pedestrian, car, truck or other medium of transportation moves through the street network.
- 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.- Default Value:false
- trimPolygonDistance Number
If polygons are being trimmed, provides the distance to trim. The default value is defined in the network analysis layer.
- trimPolygonDistanceUnits String
If polygons are being trimmed, specifies the units of trimPolygonDistance. The default is defined in the network analysis layer.
Possible Values:"centimeters"|"decimal-degrees"|"decimeters"|"feet"|"inches"|"kilometers"|"meters"|"miles"|"millimeters"|"nautical-miles"|"points"|"yards"
- useHierarchy Boolean
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
Name | Return Type | Summary | Class | |
---|---|---|---|---|
* | Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform. more details | more details | ServiceAreaParameters | |
Object | Converts an instance of this class to its ArcGIS portal JSON representation. more details | more details | ServiceAreaParameters |
Method Details
- fromJSON(json){*}static
Creates a new instance of this class and initializes it with values from a JSON object generated from a product in the ArcGIS platform. The object passed into the input
json
parameter often comes from a response to a query operation in the REST API or a toJSON() method from another ArcGIS product. See the Using fromJSON() topic in the Guide for details and examples of when and how to use this function.Parameter:json ObjectA JSON representation of the instance in the ArcGIS format. See the ArcGIS REST API documentation for examples of the structure of various input JSON objects.
Returns:Type Description * Returns a new instance of this class.
- 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:Type Description Object The ArcGIS portal JSON representation of an instance of this class.