I have an OpenaLayers/gxp application. I have base and overlay layers groups. I want to show some overlay layers when select base layer. For example when I choose BaseLayer1 I want to show OverlayLayer1 and OverlayLayer2 automatically.

I seek something in gxp but can't find anything interesting in class gxp.plugins.LayerTree. So I think only OpenLayers can help me. Is it possible to show layers when I choose another layer?


You should listen to the BaseLayer's visibilitychanged event, and then change the visibility of your OverLay layers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.