Please enable JavaScript to view this site.

Version:

Navigation: Activities > Activity Reference

Find Closest Facility Activity

Prev Top Next More

Description

Find the closest facilities around a location on a network using ArcGIS Server network analysis services.

Inputs

Url

Required

Type: String

The URL to the ArcGIS network analysis service.

For example, http://server/arcgis/rest/services/<serviceName>/NAServer/<layerName>.

Facilities

Optional

Type: esri.DataLayer (3.x, 4.x)* | esri.FeatureSet (3.x, 4.x)*

The set of facilities loaded as network locations during analysis.

Incidents

Optional

Type: esri.DataLayer (3.x, 4.x)* | esri.FeatureSet (3.x, 4.x)*

The set of incidents loaded as network locations during analysis.

Accumulate Attributes

Optional

Type: 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.

Attribute Parameter Values

Optional

Type: Object[]

An array of parameter values. If present, an attribute name, parameter name, and value must be specified.

Default Cutoff

Optional

Type: Number

The cutoff value used to determine when to stop traversing.

Default Target Facility Count

Optional

Type: Number

The number of facilities to find.

Directions Language

Optional

Type: String

The language used when generating driving directions. This parameter applies only when returnDirections parameter is set to true. If an unsupported language code is specified, the service returns the directions using the default language, English.

Directions Length Units

Optional

Type: String

The length unit to use when computing directions. The default is as defined in the specific routing network layer.

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

Directions Output Type

Optional

Type: String

Defines the amount of direction information returned.

Default value: standard.

Known values: complete | complete-no-events | instructions-only | standard | summary-only.

Directions Style Name

Optional

Type: String

The style to be used when returning directions. The default will be as defined in the network layer. View the REST layer description for your network service to see a list of supported styles.

Directions Time Attribute

Optional

Type: String

The name of network attribute to use for the drive time when computing directions.

Do Not Locate On Restricted Elements

Optional

Type: Boolean

If true, avoids network elements restricted by barriers or restrictions specified in restrictionAttributes. Default value: true.

Impedance Attribute

Optional

Type: String

The network attribute name to be used as the impedance attribute in the analysis. The default is as defined in the routing network layer. 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. For example, set impedanceAttribute to "Time" for the quickest route, or to "Length" for the shortest drive, assuming the service has those two esriNAUTCost attributes.

Output Geometry Precision

Optional

Type: Number

The precision of the output geometry after generalization.

Output Geometry Precision Units

Optional

Type: String

The units of the output geometry precision.

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

Output Lines

Optional

Type: String

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

Default Value: true-shape.

Known Values: none | straight | true-shape | true-shape-with-measure.

Out Spatial Reference

Optional

Type: Number | String | esri.SpatialReference (3.x, 4.x)*

The spatial reference for the geometries returned with the analysis results.

Point Barriers

Optional

Type: esri.DataLayer (3.x, 4.x)* | esri.FeatureSet (3.x, 4.x)*

The set of point barriers loaded as network locations during analysis. Can be an instance of a DataLayer or FeatureSet. Either a URL or features should be supplied, but not both.

Polygon Barriers

Optional

Type: esri.DataLayer (3.x, 4.x)* | esri.FeatureSet (3.x, 4.x)*

The set of polygon barriers loaded as network locations during analysis. 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.

Polyline Barriers

Optional

Type: esri.DataLayer (3.x, 4.x)* | esri.FeatureSet (3.x, 4.x)*

The set of polyline barriers loaded as network locations during analysis. 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.

Restriction Attributes

Optional

Type: String[]

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

Restrict UTurns

Optional

Type: String

Specifies how U-Turns should be handled. The default is as defined in the specific routing network layer.

Known Values: allow-backtrack | at-dead-ends-only | no-backtrack | at-dead-ends-and-intersections.

Return Directions

Optional

Type: Boolean

If true, barriers are returned in the directions property of each RouteResult. Default Value: false.

Return Facilities

Optional

Type: Boolean

If true, facilities will be returned with the analysis results. Default Value: false.

Return Incidents

Optional

Type: Boolean

If true, incidents will be returned with the analysis results. Default value: false.

Return Point Barriers

Optional

Type: Boolean

If true, point barriers will be returned in the barriers property of the ClosestFacilitySolveResult. Default value: false.

Return Polygon Barriers

Optional

Type: Boolean

If true, polygon barriers are returned in the barriers property of the ClosestFacilitySolveResult. Default value: false.

Return Polyline Barriers

Optional

Type: Boolean

If true, polyline barriers are returned in the barriers property of the ClosestFacilitySolveResult. Default value: false.

Return Routes

Optional

Type: Boolean

If true, routes are generated and returned in the route property of each ClosestFacilitySolveResult. Default Value: true.

Time Of Day

Optional

Type: Date

The arrival or departure date and time. For example, if the travelDirection is set to TO_FACILITY and timeOfDayUsage is set to "end" and timeOfDay is set to 8:00 a.m., the returned route(s) will be setup to arrive at the facility at 8:00 a.m. local time.

Time Of Day Usage

Optional

Type: String

Defines the way the timeOfDay value is used. The default value is defined in the network layer.

Known values: start | end.

Travel Direction

Optional

Type: String

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

Use Hierarchy

Optional

Type: 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.

* VertiGIS Studio Workflow uses different versions of Esri's ArcGIS API for JavaScript depending on the type of host application. See Underlying Technologies for information.

Outputs

directions

Type: esri.DirectionsFeatureSet (3.x, 4.x)*

The directions.

facilities

Type: esri.Point[] (3.x, 4.x)*

The facilities points.

incidents

Type: esri.Point[] (3.x, 4.x)*

The incidents points.

messages

Type: esri.NAMessage[] (3.x, 4.x)*

The messages returned by the network analysis service.

pointBarriers

Type: esri.Point[] (3.x, 4.x)*

The point barriers.

polygonBarriers

Type: esri.Polygon[] (3.x, 4.x)*

The polygon barriers.

polylineBarriers

Type: esri.Polyline[] (3.x, 4.x)*

The polyline barriers.

routes

Type: esri.Graphic[] (3.x, 4.x)*

The routes.

* VertiGIS Studio Workflow uses different versions of Esri's ArcGIS API for JavaScript depending on the type of host application. See Underlying Technologies for information.

Properties

For information about the ID, Display Name, and Description properties, see Properties Common to all Activities.

Connectivity Requirements

This activity does not work when the device has intermittent connectivity to the network.

Version Information

Supported from: Geocortex Viewer for HTML5 2.9, ArcGIS Web AppBuilder 2.4.

© 2024 VertiGIS North America Ltd. All Rights Reserved. | Privacy Center | Imprint
Documentation Version 5.42 (220a4365)