[OpenLayers-Users] Layer not checked in LayerSwitcher
Maren Kiehl
maren.kiehl at gmx.de
Thu Sep 3 09:30:51 EDT 2009
Thank you....that was the problem :-)
Now everything works!
--------------------------------
Andreas Hocevar schrieb:
> Hi,
>
> Maren Kiehl wrote:
>
>> I have some Layers in my OpenLayers-map as overlaysThe problem is they
>> shouldn't be checked in the LayerSwitcher by loading the map.
>> That's how I tried it, but without success:
>>
>> var wms = new OpenLayers.Layer.WMS.Untiled(
>> "Plan 1924",
>>
>> "http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/osnamap/includes/wms.map",
>> {visibility:false, isBaseLayer:false, transparent:
>> true, layers: 'plan1924'}
>> );
>>
>> Could anybody tell me how to switch the layer of?
>>
>>
>
> The Layer.WMS constructor takes 4 arguments: name, url, params and
> options. visibility:false and isBaseLayer:false have to go in the
> options (4rd) argument:
>
> var wms = new OpenLayers.Layer.WMS.Untiled(
> "Plan 1924",
> "http://localhost/cgi-bin/mapserv.exe?map=C:/ms4w/Apache/htdocs/osnamap/includes/wms.map",
> {transparent: true, layers: 'plan1924'},
> {isBaseLayer: false, visibility: false}
> );
>
>
> Regards,
> Andreas.
>
>
More information about the Users
mailing list