[OpenLayers-Users] displayInLayerSwitcher option

Eric Lemoine Eric.Lemoine at camptocamp.com
Fri Apr 27 10:38:04 EDT 2007


On 4/27/07, andy <aborruso at tin.it> wrote:
> Hi all,
> another stupid question. I would like to hide a layer in the
> layerswitcher. I know I can use displayInLayerSwitcher option, but
> probably my lack of javascript knowledge is too big.
>
> I have tried with unsuccess with this kind of syntax (openlayers 2.3):
> "var myvar= new OpenLayers.Layer.WMS( "Mylayername",
> "http://mywmsserver/wms?", {layers: 'mylayer', format:
> 'image/png',displayInLayerSwitcher: 'false'},{isBaseLayer: false});"
>
> Which is the right way to hide a layer from LayerSwitcher?
>
> Thank you for all your dev and support job,

Hi Andy,

Try removing the quotes around false, in the same way as isBaseLayer.


-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com



More information about the Users mailing list