AnsweredAssumed Answered

Clear Overlay in mapView

Question asked by danielri on Feb 10, 2017
Latest reply on Feb 13, 2017 by cmacleod-esristaff

I have a tool that gets map coordinates from a mouse click and then does some work. In code add a marker symbol at the location the person clicked. The user may click multiple times prior to exiting the tool. On exiting I would like the overlay to be cleared.

 

To add the points I'm doing this:

var disposable = await QueuedTask.Run(() =>

{

return mapView.AddOverlay(myPoint,

SymbolFactory.ConstructPointSymbol(ColorFactory.CreateRGBColor(255,255,0), 10.0, SimpleMarkerStyle.Cross).MakeSymbolReference());

});

 

Do I need to keep track of all the disposable vars (perhapse in an array) to do:

disposable.Dispose();

for each maker?

 

What I would like is a mapView.ClearOverlayAsync() command similar to  the existing

mapView.ClearSketchAsync();.

 

Ideas?

Rich

Outcomes