Select to view content in your preferred language

Closing a Freehand draw into a polygon

651
2
10-01-2012 10:54 AM
jonataspovoas
Regular Contributor
Hi,

I'm developing an area measure tool, and I need to complete a freehand draw drawn by the user into a polygon to calculate the area and show back.

How do I do it?
0 Kudos
2 Replies
HyrumErnstrom
Regular Contributor
Are you using the Draw class and listening to the DrawComplete event?

You just need to convert the Polyline to a Polygon, creating a Ring for each Path and add all points. Then add the start point to the end to complete the draw.

After that submit the Polygon to the Geometry Service for Area and Length.
0 Kudos