Packagecom.esri.ags.tasks.supportClasses
Classpublic class ClosestFacilityParameters
InheritanceClosestFacilityParameters Inheritance Object

Since : ArcGIS API for Flex 2.0

Input parameters for a ClosestFacilityTask.

Note: ClosestFacilityParameters, and other closest facility related classes, requires ArcGIS Server 10.0 or above and a "closest facility" layer. A "closest facility" layer is a layer of type "esriNAServerClosestFacilityLayer".

If you don't specify any barriers, the server will use the predefined barriers from the server. To use neither the predefined barriers, nor any user-defined ones, set the pointBarriers, polylineBarriers and polygonBarriers to empty arrays. The same applies to facilities and incidents.

View the examples

See also

com.esri.ags.tasks.ClosestFacilityTask
Barriers in Network Analysis [ArcGIS desktop help]


Public Properties
 PropertyDefined By
  accumulateAttributes : Array
The list of network attribute names to be accumulated with the analysis, i.e., which attributes should be returned as part of the response.
ClosestFacilityParameters
  attributeParameterValues : Array
A set of attribute parameter values that can be parameterized to determine which network elements can be used by a vehicle.
ClosestFacilityParameters
  defaultCutoff : Number
The default cutoff value to stop traversing.
ClosestFacilityParameters
  defaultTargetFacilityCount : int
The default number of facilities to find.
ClosestFacilityParameters
  directionsLanguage : String
The language to be used when computing directions.
ClosestFacilityParameters
  directionsLengthUnits : String
The length units to use when computing directions.
ClosestFacilityParameters
  directionsTimeAttribute : String
The name of network attribute to use for the drive time when computing directions.
ClosestFacilityParameters
  doNotLocateOnRestrictedElements : Boolean = false
If true, avoid network elements restricted by barriers or due to restrictions specified in restrictionAttributes.
ClosestFacilityParameters
  facilities : Object
The set of facilities loaded as network locations during analysis.
ClosestFacilityParameters
  impedanceAttribute : String
The network attribute name to be used as the impedance attribute in analysis.
ClosestFacilityParameters
  incidents : Object
The set of incidents loaded as network locations during analysis.
ClosestFacilityParameters
  outputGeometryPrecision : Number
The precision of the output geometry after generalization.
ClosestFacilityParameters
  outputGeometryPrecisionUnits : String
The units of the output geometry precision.
ClosestFacilityParameters
  outputLines : String
The type of output lines to be generated in the result.
ClosestFacilityParameters
  outSpatialReference : SpatialReference
The well-known ID of the spatial reference for the geometries returned with the analysis results.
ClosestFacilityParameters
  pointBarriers : Object
The set of point barrier loaded as network locations during analysis.
ClosestFacilityParameters
  polygonBarriers : Object
The set of polygon barrier loaded as network locations during analysis.
ClosestFacilityParameters
  polylineBarriers : Object
The set of polyline barrier loaded as network locations during analysis.
ClosestFacilityParameters
  restrictionAttributes : Array
The list of network attribute names to be used as restrictions with the analysis.
ClosestFacilityParameters
  restrictUTurns : String
Specifies how U-turns should be handled.
ClosestFacilityParameters
  returnDirections : Boolean = false
If true, directions will be generated and returned in the directions property of each RouteResult of the RouteSolveResult.
ClosestFacilityParameters
  returnFacilities : Boolean = false
If true, facilities will be returned with the analysis results.
ClosestFacilityParameters
  returnIncidents : Boolean = false
If true, incidents will be returned with the analysis results.
ClosestFacilityParameters
  returnPointBarriers : Boolean = false
If true, barriers will be returned in the barriers property of ClosestFacilitySolveResult.
ClosestFacilityParameters
  returnPolygonBarriers : Boolean = false
If true, polygon barriers will be returned in the polygonBarriers property of ClosestFacilitySolveResult.
ClosestFacilityParameters
  returnPolylineBarriers : Boolean = false
If true, polyline barriers will be returned in the polylineBarriers property of ClosestFacilitySolveResult.
ClosestFacilityParameters
  returnRoutes : Boolean = true
If true, closest facility routes will be generated and returned in the route property of each ClosestFacilityResult of the ClosestFacilitySolveResult.
ClosestFacilityParameters
  travelDirection : String
Options for traveling to or from the facility.
ClosestFacilityParameters
  useHierarchy : Boolean
If true, the hierarchy attribute for the network should be used in analysis.
ClosestFacilityParameters
Property Detail
accumulateAttributesproperty
public var accumulateAttributes:Array

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

See also

attributeParameterValuesproperty 
public var attributeParameterValues:Array

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.

See also

defaultCutoffproperty 
public var defaultCutoff:Number

The default cutoff value to stop traversing.

defaultTargetFacilityCountproperty 
public var defaultTargetFacilityCount:int

The default number of facilities to find.

directionsLanguageproperty 
public var directionsLanguage:String

The language to be used when computing directions. The default is as defined in the specific routing network layer used in your RouteTask. By default, NAServer gets installed with en_US only - it is up to the server administrator to add additional languages.

directionsLengthUnitsproperty 
public var directionsLengthUnits:String

The length units to use when computing directions. The default is as defined in the specific routing network layer used in your RouteTask. Possible values are "esriFeet", "esriKilometers", "esriMeters", "esriMiles", "esriNauticalMiles" and "esriYards".

directionsTimeAttributeproperty 
public var directionsTimeAttribute:String

The name of network attribute to use for the drive time when computing directions. The default is as defined in the specific routing network layer used in your RouteTask.

doNotLocateOnRestrictedElementsproperty 
public var doNotLocateOnRestrictedElements:Boolean = false

Since : ArcGIS API for Flex 2.1

If true, avoid network elements restricted by barriers or due to restrictions specified in restrictionAttributes.

The default value is false.

facilitiesproperty 
public var facilities:Object

The set of facilities loaded as network locations during analysis. Can be either an instance of DataLayer or FeatureSet.

See also

impedanceAttributeproperty 
public var impedanceAttribute:String

The network attribute name to be used as the impedance 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.

See also

incidentsproperty 
public var incidents:Object

The set of incidents loaded as network locations during analysis. Can be either an instance of DataLayer or FeatureSet.

See also

outputGeometryPrecisionproperty 
public var 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 the MaximumAllowableOffset parameter - generalization is performed according to IPolycurve.Generalize.

outputGeometryPrecisionUnitsproperty 
public var outputGeometryPrecisionUnits:String

The units of the output geometry precision.

The default value is esriUnknownUnits.

outputLinesproperty 
public var outputLines:String

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. Possible values are "esriNAOutputLineNone" (no line at all), "esriNAOutputLineStraight" (a straight line from start to end) and "esriNAOutputLineTrueShape".

See also

outSpatialReferenceproperty 
public var outSpatialReference:SpatialReference

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

pointBarriersproperty 
public var pointBarriers:Object

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

See also

polygonBarriersproperty 
public var polygonBarriers:Object

The set of polygon barrier loaded as network locations during analysis. Can be either an instance of DataLayer or FeatureSet.

See also

polylineBarriersproperty 
public var polylineBarriers:Object

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

See also

restrictionAttributesproperty 
public var restrictionAttributes:Array

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.


Example
ActionScript to use restrictionAttributes:
     myRouteParams.restrictionAttributes = ["OneWay"];
ActionScript to not use the service defaults for restrictions:
     myRouteParams.restrictionAttributes = ["none"];
restrictUTurnsproperty 
public var restrictUTurns:String

Specifies how U-turns should be handled. The default is as defined in the specific routing network layer used in your RouteTask. Possible values are "esriNFSBAllowBacktrack", "esriNFSBAtDeadEndsOnly", "esriNFSBNoBacktrack" and "esriNFSBAtDeadEndsAndIntersections".

See also

returnDirectionsproperty 
public var returnDirections:Boolean = false

If true, directions will be generated and returned in the directions property of each RouteResult of the RouteSolveResult.

The default value is false.

See also

returnFacilitiesproperty 
public var returnFacilities:Boolean = false

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

The default value is false.

returnIncidentsproperty 
public var returnIncidents:Boolean = false

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

The default value is false.

returnPointBarriersproperty 
public var returnPointBarriers:Boolean = false

If true, barriers will be returned in the barriers property of ClosestFacilitySolveResult.

The default value is false.

See also

returnPolygonBarriersproperty 
public var returnPolygonBarriers:Boolean = false

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

The default value is false.

See also

returnPolylineBarriersproperty 
public var returnPolylineBarriers:Boolean = false

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

The default value is false.

See also

returnRoutesproperty 
public var returnRoutes:Boolean = true

If true, closest facility routes will be generated and returned in the route property of each ClosestFacilityResult of the ClosestFacilitySolveResult.

The default value is true.

See also

ClosestFacilityResult.route
travelDirectionproperty 
public var travelDirection:String

Options for traveling to or from the facility. The default is defined in the network layer.

See also

useHierarchyproperty 
useHierarchy:Boolean

If true, the hierarchy attribute for the network should be used in analysis. The default is as defined in the specific routing network layer used in your ClosestFacilityTask.


Implementation
    public function get useHierarchy():Boolean
    public function set useHierarchy(value:Boolean):void
Examples
ActionScript to use ClosestFacilityParameters:
 <esri:ClosestFacilityParameters id="closestFacilityParameters" facilities="{myFacilities}"/>
MXML to use ClosestFacilityParameters:
 <esri:ClosestFacilityParameters id="closestFacilityParams"
    facilities="{incidentsFS}"
    facilities="{facilitiesFS}"
    returnIncidents="false"
    returnDirections="true"
    directionsLengthUnits="esriMiles"
    outSpatialReference="{myMap.spatialReference}"/>