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:
Any idea to solved this problem please?
Looks like you need to pass in "square-kilometers" as documented in the SDK doc:
Hope this helps,
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?