Is there any way to gracefully cancel the RequestShapeAsync task? I do not have much experience with using the C# async capabilities, but it seems the awaitable method needs to accept a cancellation token and this method does not appear to accept one. Is there any other way to cancel this method gracefully? For example, if a user is in the middle of drawing a polygon does not want to finish it, I need a way to cancel this task by clicking a cancel button.
Solved! Go to Solution.
Hi Ashley,
You can check if the Editor is active and if yes you can use Cancel.Execute.
if (MyMapView.Editor.IsActive)
MyMapView.Editor.Cancel.Execute(null);
-Asser
Hi Ashley,
You can check if the Editor is active and if yes you can use Cancel.Execute.
if (MyMapView.Editor.IsActive)
MyMapView.Editor.Cancel.Execute(null);
-Asser
Thanks Asser! That worked perfectly.