Select to view content in your preferred language

geometryEngine planarArea Units

672
2
09-07-2021 05:09 AM
KiroAndreevGDI
Emerging Contributor

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
Emerging Contributor

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