import LocateSettingBase from "@arcgis/core/rest/support/LocateSettingBase.js";const LocateSettingBase = await $arcgis.import("@arcgis/core/rest/support/LocateSettingBase.js");- Inheritance:
- LocateSettingBase→
Accessor
- Subclasses:
- LocateSetting
- Since
- ArcGIS Maps SDK for JavaScript 5.0
LocateSettingBase provides the base class for defining how to locate inputs on a network.
This class is inherited by LocateSettings.
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
| | ||
declaredClass readonly inherited | ||
LocateSettingSource[] | null | undefined | |
allowAutoRelocate
Controls whether inputs with existing network location fields can be automatically relocated when solving to ensure valid, routable location fields for the analysis.
If the value is true, points located on restricted network elements and points affected by barriers will be
relocated to the closest routable location. If the value is false, network location fields will be used as is
even if the points are unreachable, and this may cause the solve to fail. Even if the value is false, inputs
with no location fields or incomplete location fields will be located during the solve operation.
sources
- Type
- LocateSettingSource[] | null | undefined
Controls which network source can be used for locating.
Methods
fromJSON
- Signature
-
fromJSON (json: any): any
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.
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| json | 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
- any
Returns a new instance of this class.
clone
- Signature
-
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
- this
A deep clone of the class instance that invoked this method.
toJSON
- Signature
-
toJSON (): any
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() guide topic for more information.
- Returns
- any
The ArcGIS portal JSON representation of an instance of this class.