javascript radio button?

3025
3
07-13-2015 09:33 PM
SimonLynch
New Contributor III

Hello, i need to get a button/check box to behave like a radio button: Turn one layer on - results in (all) other layers going off. JavaScript API. I found this:

https://community.esri.com/thread/120571?q=layer%20control%20turn%20one%20layer%20on

but could not get the code to work. Is this functionality at all possible? Any advice received with thanks.

0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Esteemed Contributor

Simon,

   So are you using Liu's TOC widget as that thread discusses? What does your code look like so far?

0 Kudos
JoshHevenor
Occasional Contributor II

Something like what you're talking about, but not using the TOC dijit that Rob mentioned.

Edit fiddle - JSFiddle

KenBuja
MVP Honored Contributor

Here's another version that doesn't use the TOC dijit

JS Bin - Collaborative JavaScript Debugging

0 Kudos