4

I have a OpenLayers web map with LayerSwitcher control added. I need this to switch some of my layers. But I am also adding and removing some layers, which are temporary and I do not want them added to the LayerSwitcher Control.

So is there a way to add layer to OpenLayers, but without it getting automatically added in LayerSwitcher Control?

10

Simple, just set displayInLayerSwitcher: false in the layer options.

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.