Continuously calculate the radius while drawing it

702
1
03-29-2021 01:24 PM
RomanBoros
New Contributor III

Hi, in MapView I am using SketchEditor to draw a circle. What I currently managed to implement is to draw the circle and listen to the event GeometryChanged. At that moment I have access to the drawn object and I can calculate the radius after the circle is drawn. 

What I want to achieve is to continuously calculate and show the radius while the circle is being drawn, i.e. before the user releases the mouse click and the event GeometryChanged is fired. 

Is this possible to implement? I couldn't find an event that is fired while the circle is being drawn. 

I am using the latest sdk version 100.10

0 Kudos
1 Reply
DvB
by
New Contributor II

Hi, hopefully it is allowed to respond even though the question was asked 4 weeks ago. 

In case you are still working on this, I haven't tried this yet, but I believe to work around this limitation of the SketchEditors events you could just listen to a mouse movement event before starting the SketchEditor. You should then be able to grab the geometry once the event is fired and do your calculations for the radius, I imagine the "NewGeometry" would work, unless it isn't created until after the drawing is done.

0 Kudos