I just created a custom widget which doesn't have panel, UI and I just want to execute when i hit a onscreen widget icon.. Similar to location widget but I want to use in the off-panel/in-panel widgets..
When I click the icon, it is in selected mode, how to deactivate icon using code..
Cheers,
@sri_kanth0526
Srikanth,
Then I would suggest you look at my code in the LayerToggleButton Widget.
https://community.esri.com/docs/DOC-8592-layer-toggle-button-widget-version-22-01132017
So nice of you.. you gave an example as well..
Don't forget to mark this question as answered by clicking on the "Mark Correct" link on the reply that answered your question.
Sure.
I am just adding graphical layer to the map.. but toggling is performing on the default layer list...
could you please let me know for the graphical layer?
Can you provide more details on your question? Are you talking about using the Toggle Layer button widget now or are you still asking about your original question deactivating a widget?