Select to view content in your preferred language

Clear Graphic Symbol

4279
2
07-24-2014 07:34 AM
BhavinSanghani
Occasional Contributor II

Let's say I have created one GraphicsLayer and I have few graphic symbols on this layer for the selected features. I want to clear (not hide) graphic symbol on click of the feature. Can we do that? I don't see clear function in Graphic class. If I clear graphicsLayer then it will clear all graphic symbols.

0 Kudos
2 Replies
TimWitt2
MVP Alum

I was thinking about the same thing and ended up using a "right click menu" to delete graphics.

See here: Advanced Draw - JSFiddle

Hope this helps!

BhavinSanghani
Occasional Contributor II

Used graphicsSymbolLayer.remove(graphicSymbol) and that removes the symbol from the map. For associated labels, I cleared labelLayer and then recreating labels.

0 Kudos