Hello,
for a small adjustment of a JS code which was working fine under LWC 3.6 i would appreciate some help. I simply want to toggle a layer on and off - it works when the layer is visible in the legend with:
function toggleLayer() {
$(‘#node-LayerXYZ’).click();
}
The layer i want to toggle on and off should be hidden from the user, therefore i set it in the LM plugin to “hidden” - which makes it obviously impossible to simulate a “click” event. How could i switch a layer on and off?