require(["esri/geometry/operators/geodeticAreaOperator"], (geodeticAreaOperator) => { /* code goes here */ });
import * as geodeticAreaOperator from "@arcgis/core/geometry/operators/geodeticAreaOperator.js";
esri/geometry/operators/geodeticAreaOperator
Returns the geodetic area of a 2D geometry.
Notes
- Verify that
isLoaded()
returnstrue
before using this module. - Use
load()
to load this module's dependencies.
Property Overview
Name | Type | Summary | Object |
---|---|---|---|
Indicates if the operator supports input geometries that contain curves. | geodeticAreaOperator |
Property Details
-
Indicates if the operator supports input geometries that contain curves.
- Default Value:true
Method Overview
Name | Return Type | Summary | Object |
---|---|---|---|
Calculates the geodetic area of the input Geometry. | geodeticAreaOperator | ||
Indicates if all dependencies of this module have been loaded. | geodeticAreaOperator | ||
Promise | Loads this module's dependencies. | geodeticAreaOperator |
Method Details
-
execute
execute(geometry, options){Number}
-
Calculates the geodetic area of the input Geometry. Unless the
unit
option is set, the default is square-meters.ParametersSpecificationgeometry GeometryUnionThe input geometry.
options ObjectoptionalAdditional options.
ReturnsType Description Number Returns the geodetic area of the input geometry. Exampleif (!geodeticAreaOperator.isLoaded()) { await geodeticAreaOperator.load(); } // Calculate the geodetic area of a polygon. const area = geodeticAreaOperator.execute(polygon);
-
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