Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have several vectors and WMS layers in layer switcher.But i don't need these layers to be displaying in layer switcher.How can i remove these layers from layer switcher? Thanks in advance..

share|improve this question

1 Answer 1

up vote 11 down vote accepted

The option, displayInLayerSwitcher is True by default. You must pass this parameter explicitly with the False arguement.

var ol_wms = new OpenLayers.Layer.WMS("OpenLayers WMS","",
    {layers: 'basic'},
share|improve this answer
Thanks friend.... –  Mohammed shafeek Aug 13 '12 at 12:23
@Mohammedshafeek If the answer works for you, consider accepting it so the author can get true internet karma based thanks –  dassouki Aug 13 '12 at 14:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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