[OpenLayers-Users] Really basic question about base layers

bartvde at osgis.nl bartvde at osgis.nl
Fri Mar 5 09:27:13 EST 2010


Options are the 4th parameter of the constructor, so use:

         var ol_wms = new OpenLayers.Layer.WMS(
             "OpenLayers WMS",
             "http://labs.metacarta.com/wms/vmap0",
             {
                 layers: 'basic',
             }, {
                 displayInLayerSwitcher: false,
                 isBaseLayer: true
              }
         );

Best regards,
Bart

> Can you not hide the basic OpenLayers map in the layer switcher? I've done
> it with other base maps but for some reason:
>
>         var ol_wms = new OpenLayers.Layer.WMS(
>             "OpenLayers WMS",
>             "http://labs.metacarta.com/wms/vmap0",
>             {
>                 layers: 'basic',
>                 displayInLayerSwitcher: false,
>                 isBaseLayer: true
>             }
>         );
>
> Displays this layer at the top in the layer switcher. Is there something
> else I should be doing?
>
> --
> web http://www.hyxspace.com
> aim hyx1138
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>





More information about the Users mailing list