AMD:
require(["esri/geometry/operators/geodeticLengthOperator"], (geodeticLengthOperator) => { /* code goes here */ });
ESM:
import * as geodeticLengthOperator from "@arcgis/core/geometry/operators/geodeticLengthOperator.js";
Object:
esri/geometry/operators/geodeticLengthOperator
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Calculates the geodetic length of the input Geometry. | geodeticLengthOperator | ||
Indicates if all dependencies of this module have been loaded. | geodeticLengthOperator | ||
Promise | Loads this module's dependencies. | geodeticLengthOperator |
Method Details
-
execute
execute(geometry, options){Number}
-
Calculates the geodetic length of the input Geometry. Unless the
unit
option is set, the default is meters.ParametersSpecificationgeometry GeometryThe input geometry.
options ObjectoptionalAdditional options.
SpecificationcurveType StringoptionalDefault Value: "geodesic"The type of geodetic curve used to determine the length.
Possible Values:"geodesic"|"loxodrome"|"great-elliptic"|"normal-selection"|"shape-preserving"
unit LengthUnitoptionalThe length unit of the return value.
ReturnsType Description Number Returns the geodetic length of the input geometry. Example// Calculate the geodetic length of a polyline. if (geodeticLengthOperator.isLoaded()) { const length = geodeticLengthOperator.execute(polyline); }
-
Loads this module's dependencies. This method must be called first if
isLoaded
returnsfalse
.ReturnsType Description Promise Resolves when the dependencies have been loaded. - See also