[OpenLayers-Users] Re: Controll the Layervisibility by code

Jan Tappenbeck osm at tappenbeck.net
Fri Feb 18 06:41:08 EST 2011


Am 18.02.2011 10:53, schrieb Slawomir Messner:
> Hi,
> http://dev.openlayers.org/releases/OpenLayers-2.10/doc/apidocs/files/OpenLayers/Map-js.html#OpenLayers.Map.getLayersByName
>
> var layers = Map.getLayersByName(name);
> if(layers.length > 0) {
> layers[0].setVisiblity(true);
> layers[i].redraw();
> }

hi !

but why layers[0] and in the other layers[0] - the letter "i" ?????

regards Jan :-)



More information about the Users mailing list