arcgis online tool to turn on and off layers

2459
7
05-04-2016 05:21 AM
ChrisWalker4
New Contributor III

Hello All,

I currently am working on a site in which I have 6 group layers.  I want the ability to use a tool/button in which I can press it and turn on all the layers within a certain group.  I know this is simply done through the layer list BUT I would like a button for each group layer along the side of the map.  Any thoughts?

Tags (2)
0 Kudos
7 Replies
AdrianWelsh
MVP Notable Contributor

Hi Chris,

I presume you are using ArcGIS Online? Have you tried holding down the shift key and then clicking in the top check box?

0 Kudos
ChrisWalker4
New Contributor III

Yes apologies, ArcGIS Online webapp builder.

Not sure what you mean? What should I see when I hold down the shift key?

I currently have it set up where all the layers are turned on in each group layer but the group layer itself is turned off.  Once I turn on the group layer all layers that belong to it display.  I'd like a tool on the map which turns on group layer as opposed to going into the layers list.

Thanks for the help!

0 Kudos
AdrianWelsh
MVP Notable Contributor

Chris,

Whoops, I meant Control key... In ArcGIS Online (not sure about WAB), when you hold down the Control key and the click on the list of layers, they all toggle on or off. This works within grouped layers too. Can you try that in WAB to see if it works? I know that you want a tool that does this, but this may be an easy solution, at least for the interim.

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Chris,

Because you are using AGOLs WAB you are out of luck. There is no OTB widget that does this. If you were using WAB Developer edition then you could develop a custom widget to support turning on and off layers based on a button click.

0 Kudos
ChrisWalker4
New Contributor III

Thanks

I will look into the WAB Developer Edition and see what I can come up with

Thanks!

0 Kudos
JayJohnson
New Contributor III

Chris,

Did you ever find a solution to this?

0 Kudos
RobertScheitlin__GISP
MVP Esteemed Contributor

Jay,

   If you use WAB Developer Edition than you can use this custom widget:

https://community.esri.com/docs/DOC-8592-layer-toggle-button-widget-version-22-01132017