Hi,

Use the property 'visibility' of the layer

var Msg = "";
for(var i=0;i<map.layers.length;i++)
{    Msg += map.layers[i].name + " :: " + map.layers[i].visibility + "\r\n";
}
alert(Msg); 

Arnd

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] Im
Auftrag von Robert Hicks
Gesendet: Freitag, 2. Juli 2010 21:40
An: [email protected]
Betreff: [OpenLayers-Users] Function to get visible layers on a map?

Hey all, is there a function or some easy way to find which layers are set
to visible on a map?

--
web http://www.hyxspace.com
aim hyx1138
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to