Select to view content in your preferred language

Programmatically change layer visibility

770
2
11-14-2022 06:14 AM
Labels (1)
MarcoMattioli
Emerging Contributor

Hi,

I am new to ArcGIS Experience Builder Developer Edition and I am stuck in (I suppose) a fairly simply matter.

I am trying to turn on/off a number of layers (or map services) clicking on a button. I was able to implement this task in Web AppBuilder, but I can't figure out how to do it in Experience Builder.

In the settings.tsx of the widget I selected which elements to turn on/off using the Data Source Selector, but I don't understand how to use them in the widget.tsx.

Can anyone tell me if I am on the right track and/or how to proceed further?

 

Thanks,

Marco Mattioli

0 Kudos
2 Replies
UalasRohrer
Regular Contributor
0 Kudos
MarcoMattioli
Emerging Contributor

Thanks for the answer!

Is there a way to use the Data Source Selector to get the layerViews? If the answer is "no", is there another out-of-the-box component that can do the task?

 

Thanks again,

Marco Mattioli

0 Kudos