require(["esri/tasks/ServiceAreaParameters"], function(ServiceAreaParameters) { /* code goes here */ });
Name | Summary |
---|---|
new ServiceAreaParameters() | Creates a new ServiceAreaParameters object. |
Name | Type | Summary |
---|---|---|
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[] | A set of attribute parameter values that can be parameterized to determine which network elements can be used by a vehicle. |
defaultBreaks | Number[] | An array of numbers defining the breaks. |
doNotLocateOnRestrictedElements | Boolean | When true, restricted network elements should be considered when finding network locations. |
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. |
impedanceAttribute | String | The network attribute name used as the impedance attribute in analysis. |
mergeSimilarPolygonRanges | Boolean | If true, similar ranges will be merged in the result polygons. |
outSpatialReference | SpatialReference | The well-known ID of the spatial reference for the geometries returned with the analysis results. |
outputGeometryPrecision | Number | The precision of the output geometry after generalization. |
outputGeometryPrecisionUnits | String | The units of the output geometry precision. |
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. |
overlapLines | Boolean | Indicates if the lines should overlap from multiple facilities. |
overlapPolygons | Boolean | Indicates if the polygons should overlap from multiple facilities. |
pointBarriers | Object | The set of point barriers loaded as network locations during analysis. |
polygonBarriers | Object | The set of polygons barriers loaded as network locations during analysis. |
polylineBarriers | Object | The set of polyline barriers loaded as network locations during analysis. |
restrictUTurns | String | Specifies how U-Turns should be handled. |
restrictionAttributes | String[] | The list of network attribute names to be used as restrictions with the analysis. |
returnFacilities | Boolean | If true, facilities will be returned with the analysis results. |
returnPointBarriers | Boolean | If true, barriers will be returned in the barriers property of ClosestFacilitySolveResult. |
returnPolygonBarriers | Boolean | If true, polygon barriers will be returned in the polygonBarriers property of ClosestFacilitySolveResult. |
returnPolylineBarriers | Boolean | If true, polyline barriers will be returned in the polylineBarriers property of ClosestFacilitySolveResult. |
splitLinesAtBreaks | Boolean | If true, lines will be split at breaks. |
splitPolygonsAtBreaks | Boolean | If true, polygons will be split at breaks. |
timeOfDay | Date | Local date and time at the facility. |
travelDirection | String | Options for traveling to or from the facility. |
travelMode | Object | 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. |
trimPolygonDistance | Number | If polygons are being trimmed, provides the distance to trim. |
trimPolygonDistanceUnits | String | If polygons are being trimmed, specifies the units of the trimPolygonDistance. |
useHierarchy | Boolean | When true, the hierarchy attributes for the network will be used in analysis. |
require([ "esri/map", "esri/tasks/ServiceAreaParameters", ... ], function(Map, ServiceAreaParameters, ... ) { var map = new Map( ... ); var params = new ServiceAreaParameters(); params.defaultBreaks = [2]; params.outSpatialReference = map.spatialReference; params.returnFacilities = false; ... });
String[]
> accumulateAttributesObject[]
> attributeParameterValuesNumber[]
> defaultBreaksparams.defaultBreaks= [1,2];
Boolean
> doNotLocateOnRestrictedElementstrue | false
false
String[]
> excludeSourcesFromPolygonsObject
> facilitiesAt 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.
require([ "esri/graphic", "esri/tasks/FeatureSet", ... ], function(Graphic, FeatureSet, ... ) { var features = []; features.push(new Graphic(inPoint, pointSymbol)); var facilities = new FeatureSet(); facilities.features = features; paramsfacilities = facilities; ... });
String
> impedanceAttributeimpedanceAttribute=Time
for quickest route and impedanceAttribute=Length
for shortest drive. Assuming the service has those two esriNAUTCost attributes.Boolean
> mergeSimilarPolygonRangestrue | false
SpatialReference
> outSpatialReferenceNumber
> outputGeometryPrecisionString
> outputGeometryPrecisionUnitsesriUnknownUnits | esriCentimeters | esriDecimalDegrees | esriDecimeters | esriFeet | esriInches | esriKilometers | esriMeters | esriMiles | esriMillimeters | esriNauticalMiles | esriPoints | esriYards
esriUnknownUnits
String
> outputLinesString
> outputPolygonsBoolean
> overlapLinestrue | false
Boolean
> overlapPolygonstrue | false
Object
> pointBarriersAt 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.
Object
> polygonBarriersAt 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.
Object
> polylineBarriersAt 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.
String
> restrictUTurnsString[]
> restrictionAttributesmyRouteParams.restrictionAttributes = ["OneWay"];Do not use the service defaults for restrictions:
myRouteParams.restrictionAttributes = ["none"];
Boolean
> returnFacilitiestrue | false
false
Boolean
> returnPointBarrierstrue | false
false
Boolean
> returnPolygonBarrierstrue | false
Boolean
> returnPolylineBarrierstrue | false
false
Boolean
> splitPolygonsAtBreakstrue | false
Date
> timeOfDaytravelDirection
set to TO_FACILITY
, timeOfDay
value specifies arrival time at the facility. if travelDirection
set to FROM_FACILITY
, timeOfDay
specifies departure time from the facility. Requires ArcGIS Server service version 10.1 or greater. (Added at v2.6)String
> travelDirectionObject
> travelModesupportedTravelModes
array returned by the ServiceAreaTask's getServiceDescription() method. Each Travel Mode is preset in the Network Analysis settings configured inside the network dataset, in a ArcGIS Online Organization, or inside a Portal for ArcGIS. (Added at v3.14)Null
travelMode
>< > attributeParameterValues |
Required | An array of objects used to identify specific vehicle characteristics or how soft to make each restriction. Each object will have the following properties: attributeName , parameterName , and value . For additional information regarding attribute parameters, see the ArcGIS Online help topic. |
< > description |
Required | A description of the travel mode used. |
< > distanceAttributeName |
Required | The restriction attributes to respect during analysis. A list of possible restrictions of the ArcGIS Online services is listed here. NOTE: Attribute names are specific to the network dataset. They may be different if using another Network Analysis service besides the one hosted via ArcGIS Online. |
< > id |
Required | Unique identifier for the travel mode. |
< > impedanceAttributeName |
Required | The cost attribute on which to optimize the analysis, for example "Miles", "Minutes", "Travel Time", "Kilometers", "TimeAt1KPH", "WalkTime", and "TruckTravelTime". NOTE: Attribute names are specific to the network dataset. They may be different if using another Network Analysis service besides the one hosted via ArcGIS Online. |
< > name |
Required | Name of the travel mode. Users of ArcGIS Online or Portal for ArcGIS can define custom Travel Modes inside their Organization settings. Authors of stand alone Network Analysis Services can define their own Travel Modes inside a network dataset. Default ArcGIS Online Travel Modes are: "Driving Distance", "Rural Driving Distance", "Driving Time", "Rural Driving Time", "Trucking Distance", "Trucking Time", "Walking Distance", and "Walking Time". |
< > restrictionAttributeNames |
Required | The restriction attributes to respect during analysis. A list of possible restrictions of the ArcGIS Online services is listed here. NOTE: Attribute names are specific to the network dataset. They may be different if using another Network Analysis service besides the one hosted via ArcGIS Online. |
< > simplicationToleranceUnits |
Required | Possible values are: "esriFeet", "esriKilometers", "esriMeters", "esriMiles", "esriNauticalMiles", and "esriYards". |
< > simplificationTolerance |
Required | How much to generalize the output geometry. |
< > timeAttributeName |
Required | The time-based cost attribute for reporting directions,for example "Minutes", "Travel Time", "TimeAt1KPH", "WalkTime", and "TruckTravelTime". NOTE: Attribute names are specific to the network dataset. They may be different if using another Network Analysis service besides the one hosted via ArcGIS Online. |
< > type |
Required | The travel mode type. Possible values are: "AUTOMOBILE", "TRUCK", "WALK", or "OTHER". |
< > useHierarchy |
Required | Indicates whether or not to use a hierarchical road classification for faster analysis. |
< > uturnAtJunctions |
Required | Specify where u-turns are allowed. Possible values are: "esriNFSBAllowBacktrack", "esriNFSBAtDeadEndsOnly", "esriNFSBNoBacktrack", and "esriNFSBAtDeadEndsAndIntersections". |
Boolean
> trimOuterPolygontrue | false
Number
> trimPolygonDistanceString
> trimPolygonDistanceUnitsBoolean
> useHierarchyoutputLines
. Requires ArcGIS Server service version 10.1 or greater. (Added at v2.6)true | false