▾
import { geodeticAreaIsLoaded, isLoaded, geodeticAreaLoad, load, geodeticAreaExecute } from "@arcgis/core/geometry/operators/geodeticAreaOperator.js";const { geodeticAreaIsLoaded, isLoaded, geodeticAreaLoad, load, geodeticAreaExecute } = await $arcgis.import("@arcgis/core/geometry/operators/geodeticAreaOperator.js");- Since
- ArcGIS Maps SDK for JavaScript 4.31
Returns the geodetic area of a 2D geometry.
Notes
Verify that isLoaded() returns true before using this module.
Use load() to load this module's dependencies.
Type definitions
GeodeticAreaOptions
- Since
- ArcGIS Maps SDK for JavaScript 5.2
curveType
- Type
- GeodeticCurveType | undefined
The type of geodetic curve used to determine the area.
- Default value
- "geodesic"
Functions
geodeticAreaIsLoaded
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Indicates if all dependencies of this module have been loaded.
- Signature
-
geodeticAreaIsLoaded (): boolean
- Returns
- boolean
Returns
trueif this module's dependencies have been loaded.
isLoaded
Indicates if all dependencies of this module have been loaded.
- Signature
-
isLoaded (): boolean
- Returns
- boolean
Returns
trueif this module's dependencies have been loaded.
geodeticAreaLoad
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Loads this module's dependencies. This method must be called first if geodeticAreaIsLoaded returns false.
- See also
- Signature
-
geodeticAreaLoad (): Promise<void>
load
Loads this module's dependencies. This method must be called first if isLoaded returns false.
- See also
- Signature
-
load (): Promise<void>
geodeticAreaExecute
- Since
- ArcGIS Maps SDK for JavaScript 5.2
Calculates the geodetic area of the input Geometry.
Unless the unit option is set, the default is square-meters.
- Signature
-
geodeticAreaExecute (geometry: GeometryUnion, options?: GeodeticAreaOptions): number
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The input geometry. | | |
| options | Additional options. | |
- Returns
- number
Returns the geodetic area of the input geometry.
- Example
- if (!geodeticAreaIsLoaded()) {await geodeticAreaLoad();}// Calculate the geodetic area of a polygon.const area = geodeticAreaExecute(polygon);
execute
Calculates the geodetic area of the input Geometry.
Unless the unit option is set, the default is square-meters.
- Signature
-
execute (geometry: GeometryUnion, options?: GeodeticAreaOptions): number
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| geometry | The input geometry. | | |
| options | Additional options. | |
- Returns
- number
Returns the geodetic area of the input geometry.
- Example
- if (!geodeticAreaIsLoaded()) {await geodeticAreaLoad();}// Calculate the geodetic area of a polygon.const area = geodeticAreaExecute(polygon);