DistanceParameters
require(["esri/tasks/support/DistanceParameters"], function(DistanceParameters) { /* code goes here */ });
esri/tasks/support/DistanceParameters
Defines the input parameters when calling GeometryService.distance().
Constructors
- new DistanceParameters(properties)
- Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
String | The name of the class. more details | more details | Accessor | |
String | Specifies the units for measuring distance between geometry1 and geometry2. more details | more details | DistanceParameters | |
Boolean | When | more details | DistanceParameters | |
Geometry | The geometry from which the distance is to be measured. more details | more details | DistanceParameters | |
Geometry | The geometry to which the distance is to be measured. more details | more details | DistanceParameters |
Property Details
- Since: ArcGIS API for JavaScript 4.7
The name of the class. The declared class name is formatted as
esri.folder.className
.
- distanceUnit String
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"
- geodesic Boolean
- geometry1 Geometry
The geometry from which the distance is to be measured. The geometry can be a Point, Polyline, Polygon, or a Multipoint.
- geometry2 Geometry
The geometry to which the distance is to be measured. The geometry can be a Point, Polyline, Polygon, or a Multipoint.
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
Object | Converts an instance of this class to its ArcGIS portal JSON representation. more details | more details | DistanceParameters |
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:Type Description Object The ArcGIS portal JSON representation of an instance of this class.