ClosestFacilityParameters

AMD: require(["esri/rest/support/ClosestFacilityParameters"], (ClosestFacilityParameters) => { /* code goes here */ });
ESM: import ClosestFacilityParameters from "@arcgis/core/rest/support/ClosestFacilityParameters.js";
Class: esri/rest/support/ClosestFacilityParameters
Inheritance: ClosestFacilityParametersAccessor
Since: ArcGIS Maps SDK for JavaScript 4.20

ClosestFacilityParameters provides the input parameters for a closestFacility request.

See also

Constructors

ClosestFacilityParameters

Constructor
new ClosestFacilityParameters(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 Watch for changes topic.
Show inherited properties Hide inherited properties
Name Type Summary Class

Use this property to specify whether the operation should accumulate values other than the value specified for impedanceAttribute.

ClosestFacilityParameters

An authorization string used to access a resource or service.

ClosestFacilityParameters

Use this property to specify additional values required by an attribute or restriction, such as to specify whether the restriction prohibits, avoids, or prefers travel on restricted roads.

ClosestFacilityParameters

The name of the class.

Accessor

The travel time or travel distance value at which to stop searching for facilities for a given incident.

ClosestFacilityParameters

The number of closest facilities to find per incident.

ClosestFacilityParameters

The language that will be used when generating travel directions.

ClosestFacilityParameters

Specify the units for displaying travel distance in the driving directions.

ClosestFacilityParameters

Define the content and verbosity of the driving directions.

ClosestFacilityParameters

Specify the name of the formatting style for the directions.

ClosestFacilityParameters

Set the time-based impedance attribute to display the duration of a maneuver, such as "Go northwest on Alvorado St.

ClosestFacilityParameters

One or more locations that are searched for when finding the closest location.

ClosestFacilityParameters

Use this property to specify the number of decimal places in the response geometries returned by solve operation.

ClosestFacilityParameters

Use this property to specify the number of decimal places in the response geometries returned by solve operation.

ClosestFacilityParameters

Use this property to specify the number of decimal places in the response geometries returned by a solve operation.

ClosestFacilityParameters

Specify whether invalid input locations should be ignored when finding the best solution.

ClosestFacilityParameters

Specifies the impedance.

ClosestFacilityParameters

One or more locations from which the service searches for the nearby locations

ClosestFacilityParameters

Use this property to specify the spatial reference of the geometries, such as line or point features, returned by a solve operation.

ClosestFacilityParameters

Use this property to specify by how much you want to simplify the route geometry returned by the operation.

ClosestFacilityParameters

Use this property to specify the units for the value specified for the outputGeometryPrecision parameter.

ClosestFacilityParameters

Use this property to specify the type of route features that are output by the operation.

ClosestFacilityParameters

Specify additional settings that can influence the behavior of the solver when finding solutions for the network analysis problems.

ClosestFacilityParameters

Use this property to specify one or more points that will act as temporary restrictions or represent additional time or distance that may be required to travel on the underlying streets.

ClosestFacilityParameters

Use this property to specify polygons that either completely restrict travel or proportionately scale the time or distance required to travel on the streets intersected by the polygons.

ClosestFacilityParameters

Use this property to specify one or more lines that prohibit travel anywhere the lines intersect the streets.

ClosestFacilityParameters

Use this property to specify if the Object IDs specified for input locations such as stops or barriers should be preserved when the input locations are returned as output.

ClosestFacilityParameters

Specifies how U-Turns should be handled.

ClosestFacilityParameters

Use this property to specify which restrictions should be honored by the operation.

ClosestFacilityParameters

Specify whether the operation should generate driving directions for each route.

ClosestFacilityParameters

Determines if facilities will be returned by the service.

ClosestFacilityParameters

Determines if incidents will be returned by the service.

ClosestFacilityParameters

Specify whether point barriers will be returned by the routing operation.

ClosestFacilityParameters

Specify whether polygon barriers will be returned by the routing operation.

ClosestFacilityParameters

Specify whether polyline barriers will be returned by the routing operation.

ClosestFacilityParameters

Use this property to specify if the operation should return routes.

ClosestFacilityParameters

Specify whether traversed edges will be returned by the operation.

ClosestFacilityParameters

Specify whether traversed junctions will be returned by the operation.

ClosestFacilityParameters

Specify whether traversed turns will be returned by the operation.

ClosestFacilityParameters

Include z values for the returned geometries if supported by the underlying network.

ClosestFacilityParameters

Specify the time and date to depart from or arrive at incidents or facilities.

ClosestFacilityParameters

Specify the time zone or zones of the timeOfDay property.

ClosestFacilityParameters

The timeOfDay parameter value represents the arrival or departure time for the routes.

ClosestFacilityParameters

Specifies how the travel direction for the closest facility search will be measured.

ClosestFacilityParameters

A travel mode represents a means of transportation, such as driving or walking.

ClosestFacilityParameters

Specify whether hierarchy should be used when finding the shortest paths.

ClosestFacilityParameters

Property Details

accumulateAttributes

Property
accumulateAttributes String[]

Use this property to specify whether the operation should accumulate values other than the value specified for impedanceAttribute. For example, if your impedanceAttribute is set to travel-time, the total travel time for the route will be calculated by the operation. However, if you also want to calculate the total distance of the route in miles, you can specify Miles as the value for the accumulateAttributes property.

Known Value
kilometers
miles
meters
minutes
time-at-1kph
travel-time
truck-minutes
truck-travel-time
walk-time

apiKey

Property
apiKey String
Since: ArcGIS Maps SDK for JavaScript 4.21 ClosestFacilityParameters since 4.20, apiKey added at 4.21.

An authorization string used to access a resource or service. API keys are generated and managed in the portal. An API key is tied explicitly to an ArcGIS account; it is also used to monitor service usage. Setting a fine-grained API key on a specific class overrides the global API key.

Example
const start = new Graphic({
  geometry: {
    type: "point",
    x: -13656212.041436872,
    y: 5703897.952531632,
    spatialReference
  }
});

const stores = [
  [-122.67484, 45.52087],
  [-122.68365, 45.52327],
  [-122.66406, 45.52378]
];

const storeGraphics = stores.map(
  (store) =>
    new Graphic({
      geometry: {
        type: "point",
        longitude: store[0],
        latitude: store[1],
        spatialReference
      }
    })
);

const closestFacilityParameters = new ClosestFacilityParameters({
  apiKey: "YOUR_API_KEY",
  incidents: new FeatureSet({
    features: [start]
  }),
  facilities: new FeatureSet({
    features: storeGraphics
  }),
  defaultTargetFacilityCount: 2
});

const results = await solve(url, closestFacilityParameters);

attributeParameterValues

Property
attributeParameterValues AttributeParameterValue[]

Use this property to specify additional values required by an attribute or restriction, such as to specify whether the restriction prohibits, avoids, or prefers travel on restricted roads. If the restriction is meant to avoid or prefer roads, you can further specify the degree to which they are avoided or preferred using this property. For example, you can choose to never use toll roads, avoid them as much as possible, or prefer them.

declaredClass

Inherited
Property
declaredClass Stringreadonly
Inherited from Accessor

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

defaultCutoff

Property
defaultCutoff Number

The travel time or travel distance value at which to stop searching for facilities for a given incident. For example, while finding the closest hospitals from the site of an accident, a cutoff value of 15 minutes means that the tool will search for the closest hospital within 15 minutes from the incident. If the closest hospital is 17 minutes away, no routes will be returned in the output routes. A cutoff value is especially useful when searching for multiple facilities.

The unit for this parameter is based on the unit of the impedance attribute specified using the impedanceAttributeName parameter or the impedanceAttributeName of the travel mode if travel mode is specified . If the impedanceAttributeName parameter is TravelTime, the defaultCutoff is specified in minutes. Otherwise, the value is specified in miles or kilometers based on whether the impedanceAttributeName is set to Miles or Kilometers, respectively.

See also

defaultTargetFacilityCount

Property
defaultTargetFacilityCount Number

The number of closest facilities to find per incident. This is useful in situations in which multiple fire engines may be required from different fire stations, such as a fire. You can specify, for example, to find the three nearest fire stations to a fire.

The value for this parameter can be overridden on a per incident basis by specifying a value for the TargetFacilityCount attribute when specifying the incidents parameter.

directionsLanguage

Property
directionsLanguage String

The language that will be used when generating travel directions. This parameter applies only when the returnDirections parameter is set to true. The service supports generating directions in the following languages: ar, bg, bs, ca, cs, da, de, el, en, es, et, fi, fr, he, hr, hu, id, it, ja, ko, lt, lv, nb, nl, pl, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, th, tr, uk, vi, zh-CN, zh-HK and zh-TW.

directionsLengthUnits

Property
directionsLengthUnits LengthUnit |String

Specify the units for displaying travel distance in the driving directions. This parameter applies only when the returnDirections parameter is set to true.

Possible Values:"decimal-degrees" |"points" |"unknown"

directionsOutputType

Property
directionsOutputType String

Define the content and verbosity of the driving directions. This parameter applies only when the returnDirections parameter is set to true.

Possible Values:"complete" |"complete-no-events" |"featuresets" |"instructions-only" |"standard" |"summary-only"

directionsStyleName

Property
directionsStyleName String

Specify the name of the formatting style for the directions.

Possible Values:"desktop" |"navigation" |"campus"

directionsTimeAttribute

Property
directionsTimeAttribute String

Set the time-based impedance attribute to display the duration of a maneuver, such as "Go northwest on Alvorado St. for 5 minutes." The units for all the time attributes is minutes.

Known Value
minutes
time-at-1-kph
travel-time
truck-minutes
truck-travel-time
walk-time

Possible Values:"travel-time" |"truck-travel-time" |"walk-time" |"minutes" |"truck-time"

facilities

Property
facilities DataLayer |FeatureSet |NetworkFeatureSet |NetworkUrl

One or more locations that are searched for when finding the closest location.

See also
Example
const closestFacilityParameters = new ClosestFacilityParameters({
  facilities: new FeatureSet({
    features: [
      new Graphic({
        geometry: new Point({ x: -122.4079, 37.78356 }),
        attributes: {
          "Name": "Fire Station 34",
          "Attr_TravelTime": 4
        }
      }),
      new Graphic({
        geometry: new Point({ x: -122.404, 37.782 }),
        attributes: {
          "Name": "Fire Station 29",
          "Attr_TravelTime": 5
        }
      })
    ]
  })
});

geometryPrecision

Property
geometryPrecision Number
Since: ArcGIS Maps SDK for JavaScript 4.25 ClosestFacilityParameters since 4.20, geometryPrecision added at 4.25.

Use this property to specify the number of decimal places in the response geometries returned by solve operation. This applies to x- and y-values only (not m- or z-values).

geometryPrecisionM

Property
geometryPrecisionM Number
Since: ArcGIS Maps SDK for JavaScript 4.25 ClosestFacilityParameters since 4.20, geometryPrecisionM added at 4.25.

Use this property to specify the number of decimal places in the response geometries returned by solve operation. This applies to m-value only (not x-,y- or z-values).

geometryPrecisionZ

Property
geometryPrecisionZ Number
Since: ArcGIS Maps SDK for JavaScript 4.25 ClosestFacilityParameters since 4.20, geometryPrecisionZ added at 4.25.

Use this property to specify the number of decimal places in the response geometries returned by a solve operation. This applies to z-value only (not x-,y- or m-values).

ignoreInvalidLocations

Property
ignoreInvalidLocations Boolean
Since: ArcGIS Maps SDK for JavaScript 4.25 ClosestFacilityParameters since 4.20, ignoreInvalidLocations added at 4.25.

Specify whether invalid input locations should be ignored when finding the best solution. An input point is deemed invalid by the operation if it is not within the maximum snap tolerance of any traversable street. When true invalid points are ignored. When false any invalid point in your request will cause the operation to return a failure.

impedanceAttribute

Property
impedanceAttribute String

Specifies the impedance.

Impedance is a value that quantifies travel along the transportation network. Travel distance is an example of impedance; it quantifies the length of walkways and road segments. Similarly, drive time—the typical time it takes to drive a car along a road segment—is an example of impedance. This property will be ignored if travelMode is set.

Known Value
kilometers
miles
meters
minutes
time-at-1kph
travel-time
truck-minutes
truck-travel-time
walk-time

incidents

Property
incidents DataLayer |FeatureSet |NetworkFeatureSet |NetworkUrl

One or more locations from which the service searches for the nearby locations

See also
Example
const closestFacilityParameters = new ClosestFacilityParameters({
  incidents: new FeatureSet({
    features: [
      new Graphic({
        geometry: new Point({ x: -122.4079, 37.78356 }),
        attributes: {
          "Name": "Fire Incident 1",
          "Attr_TravelTime": 4
        }
      }),
      new Graphic({
        geometry: new Point({ x: -122.404, 37.782 }),
        attributes: {
          "Name": "Crime Incident 45",
          "Attr_TravelTime": 5
        }
      })
    ]
  })
});

outSpatialReference

Property
outSpatialReference SpatialReference

Use this property to specify the spatial reference of the geometries, such as line or point features, returned by a solve operation.

See also

outputGeometryPrecision

Property
outputGeometryPrecision Number

Use this property to specify by how much you want to simplify the route geometry returned by the operation. Simplification maintains critical points on a route, such as turns at intersections, to define the essential shape of the route and removes other points. The value of this property, regardless of whether you rely on the default or explicitly set a value, is overridden when you pass in travelMode.

The units are specified with the outputGeometryPrecisionUnits parameter.

outputGeometryPrecisionUnits

Property
outputGeometryPrecisionUnits LengthUnit |String

Use this property to specify the units for the value specified for the outputGeometryPrecision parameter. The value of this parameter, regardless of whether you rely on the default or explicitly set a value, is overridden when you pass in travelMode.

Possible Values:"decimal-degrees" |"points" |"unknown"

outputLines

Property
outputLines String

Use this property to specify the type of route features that are output by the operation. This parameter is applicable only if the returnRoutes parameter is set to true.

Possible Value Description
none Do not return any shapes for the routes.
straight Return a straight line between the stops.
true-shape Return the exact shape of the resulting route that is based on the underlying streets.
true-shape-with-measure Return the exact shape of the resulting route that is based on the underlying streets and include route measurements that keep track of the cumulative travel time or travel distance along the route relative to the first stop.

Possible Values:"none" |"straight" |"true-shape" |"true-shape-with-measure"

See also

overrides

Property
overrides Object
Since: ArcGIS Maps SDK for JavaScript 4.25 ClosestFacilityParameters since 4.20, overrides added at 4.25.

Specify additional settings that can influence the behavior of the solver when finding solutions for the network analysis problems.

See also

pointBarriers

Property
pointBarriers Collection<PointBarrier> |DataLayer |FeatureSet |NetworkFeatureSet |NetworkUrl

Use this property to specify one or more points that will act as temporary restrictions or represent additional time or distance that may be required to travel on the underlying streets. For example, a point barrier can be used to represent a fallen tree along a street or a time delay spent at a railroad crossing.

See also

polygonBarriers

Property
polygonBarriers Collection<PolygonBarrier> |DataLayer |FeatureSet |NetworkFeatureSet |NetworkUrl

Use this property to specify polygons that either completely restrict travel or proportionately scale the time or distance required to travel on the streets intersected by the polygons.

See also

polylineBarriers

Property
polylineBarriers Collection<PolylineBarrier> |DataLayer |FeatureSet |NetworkFeatureSet |NetworkUrl

Use this property to specify one or more lines that prohibit travel anywhere the lines intersect the streets. For example, a parade or protest that blocks traffic across several street segments can be modeled with a line barrier.

See also

preserveObjectID

Property
preserveObjectID Boolean
Since: ArcGIS Maps SDK for JavaScript 4.25 ClosestFacilityParameters since 4.20, preserveObjectID added at 4.25.

Use this property to specify if the Object IDs specified for input locations such as stops or barriers should be preserved when the input locations are returned as output.

See also

restrictUTurns

Property
restrictUTurns String

Specifies how U-Turns should be handled.

Possible Value Description
allow-backtrack U-turns are permitted everywhere. Allowing U-turns implies that the vehicle can turn around at a junction and double back on the same street.
at-dead-ends-only U-turns are prohibited at all junctions and intersections and are permitted only at dead ends.
no-backtrack U-turns are prohibited at all junctions, intersections, and dead-ends.
at-dead-ends-and-intersections U-turns are prohibited at junctions where exactly two adjacent streets meet.

Possible Values:"allow-backtrack" |"at-dead-ends-only" |"no-backtrack" |"at-dead-ends-and-intersections"

See also

restrictionAttributes

Property
restrictionAttributes String[]

Use this property to specify which restrictions should be honored by the operation. A restriction represents a driving preference or requirement. This value is ignored if travelMode is specified.

Known Value
any-hazmat-prohibited
avoid-carpool-roads
avoid-express-lanes
avoid-ferries
avoid-gates
avoid-limited-access-roads
avoid-private-roads
avoid-roads-unsuitable-for-pedestrians
avoid-stairways
avoid-toll-roads
avoid-toll-roads-for-trucks
avoid-truck-restricted-roads
avoid-unpaved-roads
axle-count-restriction
driving-a-bus
driving-a-taxi
driving-a-truck
driving-an-automobile
driving-an-emergency-vehicle
height-restriction
kingpin-to-rear-axle-length-restriction
length-restriction
preferred-for-pedestrians
riding-a-motorcycle
roads-under-construction-prohibited
semi-or-tractor-with-one-or-more-trailers-prohibited
single-axle-vehicles-prohibited
tandem-axle-vehicles-prohibited
through-traffic-prohibited
truck-with-trailers-restriction
use-preferred-hazmat-routes
use-preferred-truck-routes
walking
weight-restriction

Possible Values:"any-hazmat-prohibited" |"avoid-carpool-roads" |"avoid-express-lanes" |"avoid-ferries" |"avoid-gates" |"avoid-limited-access-roads" |"avoid-private-roads" |"avoid-roads-unsuitable-for-pedestrians" |"avoid-stairways" |"avoid-toll-roads" |"avoid-toll-roads-for-trucks" |"avoid-truck-restricted-roads" |"avoid-unpaved-roads" |"axle-count-restriction" |"driving-a-bus" |"driving-a-taxi" |"driving-a-truck" |"driving-an-automobile" |"driving-an-emergency-vehicle" |"height-restriction" |"kingpin-to-rear-axle-length-restriction" |"length-restriction" |"preferred-for-pedestrians" |"riding-a-motorcycle" |"roads-under-construction-prohibited" |"semi-or-tractor-with-one-or-more-trailers-prohibited" |"single-axle-vehicles-prohibited" |"tandem-axle-vehicles-prohibited" |"through-traffic-prohibited" |"truck-with-trailers-restriction" |"use-preferred-hazmat-routes" |"use-preferred-truck-routes" |"walking" |"weight-restriction" |"string"

returnDirections

Property
returnDirections Boolean

Specify whether the operation should generate driving directions for each route. If true directions are configured based on the values for the directionsLanguage, directionsOutputType, directionsStyleName, and directionsLengthUnits properties.

Default Value:false
See also

returnFacilities

Property
returnFacilities Boolean

Determines if facilities will be returned by the service.

Default Value:false
See also

returnIncidents

Property
returnIncidents Boolean

Determines if incidents will be returned by the service.

Default Value:false
See also

returnPointBarriers

Property
returnPointBarriers Boolean

Specify whether point barriers will be returned by the routing operation.

Default Value:false
See also

returnPolygonBarriers

Property
returnPolygonBarriers Boolean

Specify whether polygon barriers will be returned by the routing operation.

Default Value:false
See also

returnPolylineBarriers

Property
returnPolylineBarriers Boolean

Specify whether polyline barriers will be returned by the routing operation.

Default Value:false
See also

returnRoutes

Property
returnRoutes Boolean

Use this property to specify if the operation should return routes. If true, the shape of the routes depends on the value for the outputLines property.

Default Value:true
See also

returnTraversedEdges

Property
returnTraversedEdges Boolean
Since: ArcGIS Maps SDK for JavaScript 4.25 ClosestFacilityParameters since 4.20, returnTraversedEdges added at 4.25.

Specify whether traversed edges will be returned by the operation.

returnTraversedJunctions

Property
returnTraversedJunctions Boolean
Since: ArcGIS Maps SDK for JavaScript 4.25 ClosestFacilityParameters since 4.20, returnTraversedJunctions added at 4.25.

Specify whether traversed junctions will be returned by the operation.

returnTraversedTurns

Property
returnTraversedTurns Boolean
Since: ArcGIS Maps SDK for JavaScript 4.25 ClosestFacilityParameters since 4.20, returnTraversedTurns added at 4.25.

Specify whether traversed turns will be returned by the operation.

returnZ

Property
returnZ Boolean
Since: ArcGIS Maps SDK for JavaScript 4.25 ClosestFacilityParameters since 4.20, returnZ added at 4.25.

Include z values for the returned geometries if supported by the underlying network.

See also

timeOfDay

Property
timeOfDay Date |String

Specify the time and date to depart from or arrive at incidents or facilities. You can also specify a value of "now", to set the depart or arrive time to current time.

For ClosestFacilityParameters the timeOfDay is always "now".

See also

timeOfDayIsUTC

Property
timeOfDayIsUTC Boolean
Since: ArcGIS Maps SDK for JavaScript 4.25 ClosestFacilityParameters since 4.20, timeOfDayIsUTC added at 4.25.

Specify the time zone or zones of the timeOfDay property.

See also

timeOfDayUsage

Property
timeOfDayUsage String

The timeOfDay parameter value represents the arrival or departure time for the routes.

Possible Values:"start" |"end" |"not-used"

See also

travelDirection

Property
travelDirection String

Specifies how the travel direction for the closest facility search will be measured.

Possible Value Description
from-facility Direction of travel is from facilities to incidents.
to-facility Direction of travel is from incidents to facilities.

Possible Values:"from-facility" |"to-facility"

See also

travelMode

Property
travelMode TravelMode

A travel mode represents a means of transportation, such as driving or walking. Travel modes define the physical characteristics of a vehicle or pedestrian.

Use networkService.fetchServiceDescription to obtain a list of predefined travel modes and the default travel mode that is used if one is not specified in a routing reqest.

useHierarchy

Property
useHierarchy Boolean

Specify whether hierarchy should be used when finding the shortest paths. This value is ignored if a travelMode is specified.

Default Value:false
See also

Method Overview

Show inherited methods Hide inherited methods
Name Return Type Summary Class

Adds one or more handles which are to be tied to the lifecycle of the object.

Accessor
this

Creates a deep clone of this object.

ClosestFacilityParameters
*

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product.

ClosestFacilityParameters

Returns true if a named group of handles exist.

Accessor

Removes a group of handles owned by the object.

Accessor

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

ClosestFacilityParameters

Method Details

addHandles

Inherited
Method
addHandles(handleOrHandles, groupKey)
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, addHandles added at 4.25.

Adds one or more handles which are to be tied to the lifecycle of the object. The handles will be removed when the object is destroyed.

// Manually manage handles
const handle = reactiveUtils.when(
  () => !view.updating,
  () => {
    wkidSelect.disabled = false;
  },
  { once: true }
);

this.addHandles(handle);

// Destroy the object
this.destroy();
Parameters
handleOrHandles WatchHandle|WatchHandle[]

Handles marked for removal once the object is destroyed.

groupKey *
optional

Key identifying the group to which the handles should be added. All the handles in the group can later be removed with Accessor.removeHandles(). If no key is provided the handles are added to a default group.

clone

Method
clone(){this}

Creates a deep clone of this object. Any properties that store values by reference will be assigned copies of the referenced values on the cloned instance.

Returns
Type Description
this A deep clone of the class instance that invoked this method.

fromJSON

Method
fromJSON(json){*}static

Creates a new instance of this class and initializes it with values from a JSON object generated from an ArcGIS product. 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 Object

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

hasHandles

Inherited
Method
hasHandles(groupKey){Boolean}
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, hasHandles added at 4.25.

Returns true if a named group of handles exist.

Parameter
groupKey *
optional

A group key.

Returns
Type Description
Boolean Returns true if a named group of handles exist.
Example
// Remove a named group of handles if they exist.
if (obj.hasHandles("watch-view-updates")) {
  obj.removeHandles("watch-view-updates");
}

removeHandles

Inherited
Method
removeHandles(groupKey)
Inherited from Accessor
Since: ArcGIS Maps SDK for JavaScript 4.25 Accessor since 4.0, removeHandles added at 4.25.

Removes a group of handles owned by the object.

Parameter
groupKey *
optional

A group key or an array or collection of group keys to remove.

Example
obj.removeHandles(); // removes handles from default group

obj.removeHandles("handle-group");
obj.removeHandles("other-handle-group");

toJSON

Method
toJSON(){Object}

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

Returns
Type Description
Object The ArcGIS portal JSON representation of an instance of this class.

Type Definitions

AttributeParameterValue

Type Definition
AttributeParameterValue

An object describing the parameter values for the attributeParameterValues property of ClosestFacilityParameters.

Properties
attributeName String

The name of the restriction.

parameterName String

The name of the parameter associated with the restriction. A restriction can have one or more parameterName properties.

The value for parameterName.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.