Map-Layer widget, force one visible layer

121
0
02-08-2021 01:59 PM
YvesJrC
New Contributor

Hi everyone, I'm currently looking for a way to customize the default Map-Layer widget from experience builder because I need to change the default behavior when the user toggle a layer visibility: 

YvesJrC_0-1612820611523.png


The default widget allow the user to change the visibility of multiple layers shown at the same time, however I need it to only allow one layer at the time to be visible. So if the user set the visibility of one layer, the others should be automatically set to invisible:

Before:

YvesJrC_4-1612821175721.png

 

User click on the "Arrondissements" layer

 

After:

YvesJrC_7-1612821301506.png

 


The widget has some options like setting the opacity, zoom to and get info of the layer which all create an event that can be easily found in their respective .ts file : goto.ts, information.ts and opacity.ts, however I was not able to find anything about the layers visibility.

YvesJrC_3-1612820932506.png

 

Should I look somewhere else in the others default widgets for that or I am missing something? Thanks for the help!


 

0 Replies