Hi
I'm creating an interactive map. I've added a graphic layer use
var graphic = new Graphic(Point,Symbol,attr,infoTemplate);
method. When I click on the graphic infoWindow will popup. Now I want to create another button, when I click it, the selection clears. I couldn't find a method to clear selection. I know there is clearSelection function in feature layer, but what about graphic layer?
I've disabled popup and show the infoTemplate content in another place. But the onClearFeatures event didn't fire.
Is there a way to clear the selection or make this onClearFeatures event fire??
Solved! Go to Solution.
Han,
The selection of the graphic is coming from the map.infoWindow. so to clear the selection you would use map.InfoWindow.clearFeatures()
Han,
The selection of the graphic is coming from the map.infoWindow. so to clear the selection you would use map.InfoWindow.clearFeatures()
Thank you! It worked!!!
Great. Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.