[OpenLayers-Users] Set visibility of WMS layer

Diego Guidi diegoguidi at gmail.com
Tue Jan 8 04:29:41 PST 2013


> I set visibility: false when creating the WMS layer.
> This results in the layer being shown in the layer switcher but turned off.
> Exactly what I want. But I can't turn it on anymore. It seems to be
> disabled.

Tried using layer,setVisibility(true) instead of layer.visibility = true?
http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Layer-js.html#OpenLayers.Layer.setVisibility


More information about the Users mailing list