DistanceParameters

require(["esri/tasks/support/DistanceParameters"], function(DistanceParameters) { /* code goes here */ });
Class: esri/tasks/support/DistanceParameters
Inheritance: DistanceParameters Accessor
Since: ArcGIS API for JavaScript 4.0

Defines the input parameters when calling GeometryService.distance().

See also:

Constructors

new DistanceParameters(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 Working with Properties topic.
NameTypeSummaryClass
String

The name of the class.

more details
more detailsAccessor
String

Specifies the units for measuring distance between geometry1 and geometry2.

more details
more detailsDistanceParameters
Boolean

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

more details
more detailsDistanceParameters
Geometry[]

The geometry from which the distance is to be measured.

more details
more detailsDistanceParameters
Geometry[]

The geometry to which the distance is to be measured.

more details
more detailsDistanceParameters

Property Details

declaredClassStringreadonly inherited

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

distanceUnitString

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.

Possible Values: feet | kilometers | meters | miles | nautical-miles | yards

geodesicBoolean

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

geometry1Geometry[]

The geometry from which the distance is to be measured. The geometry can be a Point, Polyline, Polygon, or a Multipoint.

geometry2Geometry[]

The geometry to which the distance is to be measured. The geometry can be a Point, Polyline, Polygon, or a Multipoint.

Method Overview

NameReturn TypeSummaryClass
Object

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

more details
more detailsDistanceParameters

Method Details

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:
TypeDescription
ObjectThe ArcGIS Portal JSON representation of an instance of this class.

API Reference search results

NameTypeModule

There were no match results from your search criteria.