Forum Discussion

AndrewBlemings-'s avatar
AndrewBlemings-
Community Member
22 days ago

Showing/Hiding Layers

Just to confirm, there's not a way to show and hide layers via the API or DOM, right?

I'm a veteran of creating a boolean and toggling that to show and hide a layer, but a single line of JavaScript would be amazing.

2 Replies

  • Nope. No public API anyway. I think via the variable is safest as there may be other stuff executed when a layer is shown/hidden, when those triggers are fired, that wouldn't be, if you went a more direct route.

    • AndrewBlemings-'s avatar
      AndrewBlemings-
      Community Member

      I didn't think about it from an orchestration standpoint but that makes a lot of sense. I'll keep dreaming.