Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 13 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.