Toggle visibility of circle layers, and popup on visible ones

13 Views Asked by At

I have succeeded in toggle 2 layers with red and green circles . Now I would want to have a popup only visible layer. I can't get the visible layer, after toggle, and popup on it . Guess it's a problem of workflow ...

I have a mapbox-gl map, and 2 circle layers. I succeeded in toggle the 2 layers visible/not visible, following Mapbox: Visibility none for all layers when one is visible. Then, I can't get mouseenter/hover the visible layer and display a popup on it.

0

There are 0 best solutions below