SketchEditor - draw multiple object simultaneously

259
1
Jump to solution
11-20-2019 08:00 PM
PrashantKirpan
Occasional Contributor

Hi All,

I am trying to implement spatial filter on feature service. I believe SketchEditor would be appropriate control for this.

I have toolbar button on map to activate spatial filter and keep activate until user selects another tool.

Once i finished drawing with SketchEditor  it does't allow me to draw another object.

Is there any way i can draw multiple objects simultaneously after activating control?

Any help would be appreciated.

Prashant

0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Frequent Contributor

You could just do it in a loop calling draw every time it completes:
while(toolbarButton.IsOn)
 {

   try {
     var geometry = await editor.StartAsync(SketchCreationModel.FreehandPolygon, false);

  }

  catch(TaskCanceledException)

  {

     break;

  }
}

View solution in original post

1 Reply
dotMorten_esri
Esri Frequent Contributor

You could just do it in a loop calling draw every time it completes:
while(toolbarButton.IsOn)
 {

   try {
     var geometry = await editor.StartAsync(SketchCreationModel.FreehandPolygon, false);

  }

  catch(TaskCanceledException)

  {

     break;

  }
}