geodeticAreaOperator

AMD: require(["esri/geometry/operators/geodeticAreaOperator"], (geodeticAreaOperator) => { /* code goes here */ });
ESM: import * as geodeticAreaOperator from "@arcgis/core/geometry/operators/geodeticAreaOperator.js";
Object: esri/geometry/operators/geodeticAreaOperator
Since: ArcGIS Maps SDK for JavaScript 4.31
beta

Returns the geodetic area of a 2D geometry.

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

Method
execute(geometry, options){Number}

Calculates the geodetic area of the input Geometry. Unless the unit option is set, the default is square-meters.

Parameters
Specification
geometry Geometry

The input geometry.

options Object
optional

Additional options.

Specification
curveType String
optional
Default Value: "geodesic"

The type of geodetic curve used to determine the area.

Possible Values:"geodesic"|"loxodrome"|"great-elliptic"|"normal-selection"|"shape-preserving"

unit AreaUnit
optional

The area unit of the return value.

Returns
Type Description
Number Returns the geodetic area of the input geometry.
Example
// Calculate the geodetic area of a polygon.
if (geodeticAreaOperator.isLoaded()) {
 const area = geodeticAreaOperator.execute(polygon);
}

isLoaded

Method
isLoaded(){Boolean}

Indicates if all dependencies of this module have been loaded.

Returns
Type Description
Boolean Returns true if this module's dependencies have been loaded.

load

Method
load(){Promise}

Loads this module's dependencies. This method must be called first if isLoaded returns false.

Returns
Type Description
Promise Resolves when the dependencies have been loaded.
See also

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.