Take the 2-minute tour ×
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 10 down vote accepted

The option, displayInLayerSwitcher is True by default. You must pass this parameter explicitly with the False arguement. http://dev.openlayers.org/docs/files/OpenLayers/Layer-js.html

var ol_wms = new OpenLayers.Layer.WMS("OpenLayers WMS","http://vmap0.tiles.osgeo.org/wms/vmap0",
    {layers: 'basic'},
    {'displayInLayerSwitcher':false}
);
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

 
discard

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.