Ah. That's a very different question.
You should use Polygon.getCentroid() to get the centerpoint of the circle.
Then use Polygon.getPoint(0,0) to get a Point from the circle and use geometryEngine.distance() between the two points to determine the radius.
That assumes you used the Draw.CIRCLE type when you call draw.activate().
Please note that you appear to be using the draw-end event and it seems that is deprecated in favor of the draw-complete event.
Thank you this was really useful.
one more clarification.
I saw the below format in tutorial:
geometry.getPoint(0,0)
Object {type: "point", x: -15849192.693999259, y: 10478016.378614787, spatialReference: Object}
geometry.getCentroid()
Object {type: "point", x: -18090547.842482734, y: 10478016.37861477, spatialReference: Object}
How can i proceed with distance function.Sorry i am new to esri map? Can you please clarify this too?
No problem . The following should get you the radius in meters:
var radius = geometryEngine.distance(geometry.getCentroid(),geometry.getPoint(0,0),"meters");
When i try to add
esri/geometry/geometryEngine
under require in the which i posted before ,it is giving me error saying
Uncaught ReferenceError: require is not defined
Can i get your help on this?
Probably best to post a question like that over on the ArcGIS API for JavaScript space. But if your previous require statement worked, this will work too. Since you're getting started with the APIs, perhaps take a look at the Develop sections of the DevLabs and Hackerlabs (including the 3.x labs).
Really sorry that was issue in network.
radius:1927212.6012732424
The above radius i got when executed that code.
But is this valid value,i doubt that?