Switch on individual layers of a map with a button

493
4
10-26-2021 05:14 AM
Labels (1)
ksm-hh
by
New Contributor

Hello all,

I have loaded a web map with different layers into Experience Builder to create a WebApp. In this web app, individual layers of the web map should be able to be switched on and off with a button or a switch.

Is this possible and do you have any tips on how I can implement this?

Many greetings

4 Replies
GavinRehkemper
Esri Contributor

Hi, when adding the map widget to your Experience, there is an option to enable the "Layers" tool which will allow the end user of the app to toggle visibility of layers.

GavinRehkemper_0-1635434869457.png

exb-vid.gif

 

BrandonGuo
New Contributor III

It's different with a button that quickly turns on/off a layer. If a map has multiple layers, users might want a quick button to turn on a frequently used layer. 

0 Kudos
blairtinker
New Contributor II

Out of curiosity did you figure out a way to do this.  I sort of have a hacked method using the filter widget but it's not pretty.  The people we are making the map for really don't like the layer widget, they want easy to click buttons.

HalleyGrundy
New Contributor

I am also interested in this - especially if you can create a button that will turn a group of layers on/off. 
@blairtinker, how did you do this with the filter widget? 

0 Kudos