Popup disabled : clear selection method

875
3
Jump to solution
04-02-2018 11:57 PM
HanBai
by
New Contributor

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??

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Han,

   The selection of the graphic is coming from the map.infoWindow. so to clear the selection you would use map.InfoWindow.clearFeatures()

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

Han,

   The selection of the graphic is coming from the map.infoWindow. so to clear the selection you would use map.InfoWindow.clearFeatures()

HanBai
by
New Contributor

Thank you! It worked!!!

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Great. Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.

0 Kudos