[ka-Map-users] set Layer's visibility

stinjia stinjia at 163.com
Sun Aug 20 21:02:47 EDT 2006


I use setvisibility to control layer'visibility,but it dosen't work.
allLayers.length is 1,and name is _base_
and there actually have 3 layers,why?

following the code:

var map = myKaMap.getCurrentMap();
var allLayers = map.getAllLayers();
for (var i=0; i<allLayers.length; i++) {
    if(allLayers[i].name=="construction")
    allLayers[i].setVisibility(false);
}



Justin
2006-08-21
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20060821/6c87d04e/attachment.html


More information about the ka-Map-users mailing list