import DistanceParameters from "@arcgis/core/rest/support/DistanceParameters.js";const DistanceParameters = await $arcgis.import("@arcgis/core/rest/support/DistanceParameters.js");- Inheritance:
- DistanceParameters→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.20
Defines the input parameters when calling distance().
Constructors
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
Properties
| Property | Type | Class |
|---|---|---|
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
| |
distanceUnit
- Type
- GeometryOperationLengthUnit | null | undefined
Specifies the units for measuring distance between geometry1 and geometry2. If the unit is not specified the units are derived from the spatial reference. For a list of valid units, see esriSRUnitType Constants and esriSRUnit2Type Constants.
geometry1
- Type
- GeometryUnion | null | undefined
The geometry from which the distance is to be measured. The geometry can be a Point, Polyline, Polygon, or a Multipoint.
geometry2
- Type
- GeometryUnion | null | undefined
The geometry to which the distance is to be measured. The geometry can be a Point, Polyline, Polygon, or a Multipoint.
Methods
| Method | Signature | Class |
|---|---|---|
toJSON(): object | |
toJSON
- Signature
-
toJSON (): object
Converts an instance of this class to its ArcGIS portal JSON representation. See the Using fromJSON() topic in the Guide for more information.
- Returns
- object
The ArcGIS portal JSON representation of an instance of this class.