Skip to content
import DistanceParameters from "@arcgis/core/rest/support/DistanceParameters.js";
Inheritance:
DistanceParametersAccessor
Since
ArcGIS Maps SDK for JavaScript 4.20

Defines the input parameters when calling distance().

See also

Constructors

Constructor

Constructor
Parameters
ParameterTypeDescriptionRequired
properties
See the properties table for a list of all the properties that may be passed into the constructor.

Properties

Any properties can be set, retrieved or listened to. See the Watch for changes topic.

declaredClass

readonlyinherited Property
Type
string
Inherited from: Accessor

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

distanceUnit

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

geodesic

Property
Type
boolean | null | undefined

When true, the geodesic distance between geometry1 and geometry2 is measured.

geometry1

autocast Property
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

autocast Property
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

MethodSignatureClass
toJSON(): object

toJSON

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