Remove marker from map when a call is removed

485
3
01-16-2020 12:43 PM
ElizabethWare1
New Contributor

Brad Niemand I am adding a marker when a focus is done on a particular call or address. How do I clear that marker.

Here is how I am adding it:

// Set colors of results marker...
IGraphicProperties graphicProperties = new CommandsEnvironmentClass();
//Get the IRgbColor interface
IRgbColor color = new RgbColorClass();

color.RGB = Color.Lime.ToArgb();

//Get the IMarkerSymbol interface
IMarkerSymbol marker = (IMarkerSymbol)graphicProperties.MarkerSymbol;

marker.Color = color;
marker.Size = 10;
graphicProperties.MarkerSymbol = marker;

So how would I remove it? I tried setting the Marker Symbol to null, but that didn't work.

Thanks

Liz

0 Kudos
3 Replies
BradNiemand
Esri Regular Contributor

Liz,

Unfortunately I am not of much help here.  You are working in an area where I have no experience.

Maybe this thread will help though?

https://community.esri.com/thread/114287 

Brad

0 Kudos
ElizabethWare1
New Contributor

Thanks Brad. Maybe someone else has an idea. I am viewing the one you sent. Currently, I don't believe my marker is in its own layer, but I would think I would be able to clear out the marker. I will keep looking.

0 Kudos
ElizabethWare1
New Contributor

I have figure it out. Thanks.

0 Kudos