Select to view content in your preferred language

Measurement is meter square

597
2
12-12-2017 12:23 PM
xxxlll
by
New Contributor

Hello everyone.

In this sample code can I measure the area of the selected area as Meter square. It is given in acres .

var area = geometryEngine.geodesicArea(polygon, "acres");
if (area < 0) {
   var simplifiedPolygon = geometryEngine.simplify(polygon);
   if (simplifiedPolygon) {
      area = geometryEngine.geodesicArea(simplifiedPolygon, "acres");
   }
}

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

anything geodesic I am sure you can specify the coordinates.  Perhaps it is in acres because the projection uses feet for coordinates.  What does the documentation for that method show?

0 Kudos
ModyBuchbinder
Esri Regular Contributor

Hi

Check this doc: geometryEngine | API Reference | ArcGIS API for JavaScript 4.5 

Use square-meters as paramater

0 Kudos