areaOperator

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

Returns the planar area of a 2D geometry in its spatial reference units.

Method Overview

Name Return Type Summary Object

Calculates the planar area of the input geometry.

areaOperator

Method Details

execute

Method
execute(geometry, options){Number}

Calculates the planar area of the input geometry.

Parameters
geometry Geometry

The geometry to calculate the area from.

options Object
optional

Additional options.

Specification
unit AreaUnit
optional

The area unit of the return value.

Returns
Type Description
Number Returns the planar area of the geometry.
Example
// Calculate the area of a polygon
const area = areaOperator.execute(polygon);

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

The developer dashboard has moved

You can no longer sign into this site. Go to your ArcGIS portal or the ArcGIS Location Platform dashboard to perform management tasks.

Your ArcGIS portal

Create, manage, and access API keys and OAuth 2.0 developer credentials, hosted layers, and data services.

Your ArcGIS Location Platform dashboard

Manage billing, monitor service usage, and access additional resources.

Learn more about these changes in the What's new in Esri Developers June 2024 blog post.

Close