HOW TO
In ArcGIS Online, it is possible to automatically calculate area when a polygon feature is created in Map Viewer. This functionality can be automated by configuring the appropriate field in the form within Map Viewer. This helps maintain accurate area information during updates and minimizes the risk of errors.
The workflow in this article is applicable for ArcGIS Online and Portal for ArcGIS Map Viewer. This article outlines the workflow for automatically calculating the area when creating polygon features in ArcGIS Online.
var area_unit = 0 if ($editcontext.editType == "INSERT") { var geom = Geometry($feature) area_unit = AreaGeodetic(geom, '<unit>') } return area_unit
The code below is the full Arcade expression, with acres used as the unit of measurement in this example.
var area_unit = 0 if ($editcontext.editType == "INSERT") { var geom = Geometry($feature) area_unit = AreaGeodetic(geom, 'acres') } return area_unit
Note: The area of the polygon is calculated in the 'Create features' pane after the polygon feature is created.
The image below shows the area of the polygon features automatically calculated when a new polygon is added to the map.
Note: This functionality can also be implemented in ArcGIS Field Maps Designer using the same expression. Refer to ArcGIS Field Maps: Add calculated expressions for instructions.
Article ID: 000036152
Get help from ArcGIS experts
Download the Esri Support App