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:
Any idea to solved this problem please?
Best Regard.
Hi there,
Looks like you need to pass in "square-kilometers" as documented in the SDK doc:
3.x: https://developers.arcgis.com/javascript/3/jsapi/esri.geometry.geometryengine-amd.html#planararea
Hope this helps,
-Undral
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.