Switch on individual layers of a map with a button

11448
30
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

30 Replies
KristapsKaugurs
New Contributor

Nice idea!
It took me a while to figure out what you are talking about, but I got there 🙂
This looks a lot like my reverse filter method where layer is loaded and then filtered out. Does this also load all the layer data to the map straight away?
See, if I am working with large datasets, then layers that are switched off, dont take up any resources. Once you load everything in, the app starts to slow down.
My reverse filter method loads all data and hides it by filtering it away. However, it LOADS IT ALL to the memory and thus is very unusable with large datasets. Do selectors behave better?

0 Kudos