geometryEngine planarArea Units

308
2
09-07-2021 05:09 AM
KiroAndreevGDI
New Contributor II

Dear,

 

I would like to calculate Area of geometry by geometry engine Planar Area function, but I have problem with units measurement.

My code is:

 

 

var area=geometryEngine.planarArea(geometry.geometry, units.SQUARE_KILOMETERS)

 

 

 

but i get an error in console:

KiroAndreevGDI_0-1631016460016.png

 

Any idea to solved this problem please?

 

Best Regard.

 

0 Kudos
2 Replies
UndralBatsukh
Esri Regular Contributor
0 Kudos
KiroAndreevGDI
New Contributor II

Dear  UndralBatsukh,

 

I changed code into:

 

 var area = geometryEngine.planarArea(geometry.geometry, "square-kilometers")

 

 

and message in console is in Attached file.

 

 

How to solved this problem?

Best regard.

0 Kudos