<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content=text/html;charset=utf-8>
<META content="MSHTML 6.00.6001.18294" name=GENERATOR></HEAD>
<BODY id=MailContainerBody
style="PADDING-RIGHT: 10px; PADDING-LEFT: 10px; PADDING-TOP: 15px" leftMargin=0
topMargin=0 CanvasTabStop="true" name="Compose message area">
<DIV><FONT face=Arial size=2>Handle the 'render' event of the layer tree and
programmatically uncheck the nodes that you don't want on.</FONT></DIV>
<DIV><FONT face=Arial size=2>The only disadvantage of this method is that
depending on timing the application may or may not attempt to do GetMap requests
on the layers you don't want. Though they still would not be visible, if you are
calling a slow service or complex rendering is involved, then the GetMap
requests can block other WMS service requests.</FONT></DIV>
<DIV><FONT face=Arial size=2>Matt Priour</FONT></DIV>
<DIV><FONT face=Arial size=2>Kestrel
Computer Consullting</FONT> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A title=pauljame@gmail.com
href="mailto:pauljame@gmail.com">Paul james</A> </DIV>
<DIV><B>Sent:</B> Wednesday, October 14, 2009 9:39 AM</DIV>
<DIV><B>To:</B> <A title=bartvde@osgis.nl
href="mailto:bartvde@osgis.nl">bartvde@osgis.nl</A> </DIV>
<DIV><B>Cc:</B> <A title=users@geoext.org
href="mailto:users@geoext.org">users@geoext.org</A> ; <A
title=ahocevar@opengeo.org href="mailto:ahocevar@opengeo.org">Andreas
Hocevar</A> </DIV>
<DIV><B>Subject:</B> Re: [Users] Set visibility on Sub-layers</DIV></DIV></DIV>
<DIV><BR></DIV>
<DIV>Thanks bart...</DIV>
<DIV>But I need set all layers to build up my treeview, like that:</DIV>
<DIV> </DIV>
<DIV>nodeType:
"gx_layer",<BR>
layer:
"Streets",<BR>
isLeaf:
false,<BR>
<BR>
loader:
{<BR>
param: "LAYERS",</DIV>
<DIV>...</DIV>
<DIV> </DIV>
<DIV><BR><BR> </DIV>
<DIV class=gmail_quote>On Wed, Oct 14, 2009 at 11:16 AM, <SPAN dir=ltr><<A
href="mailto:bartvde@osgis.nl">bartvde@osgis.nl</A>></SPAN> wrote:<BR>
<BLOCKQUOTE class=gmail_quote
style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi
Paul,<BR><BR>only by using LAYERS: ['layer1', 'layer2'].<BR><BR>Then later on,
when you need more layers, you should change the LAYERS<BR>param using the
mergeNewParams function.<BR><BR>Best regards,<BR>Bart<BR>
<DIV class=im><BR>> Hello guys... I have that set of sublayers
:<BR>><BR>> new OpenLayers.Layer.MapServer("Streets",<BR>>
_cgi, {<BR>>
map: _mapfile,<BR>>
"LAYERS": ['Layer1','Layer2','Layer3','Layer4',<BR>> 'Layer5'],<BR>>
transparent: true,<BR>>
format: "image/png"<BR>>
}, {<BR>>
isBaseLayer: false,<BR>>
buffer: 0,<BR>>
displayInLayerSwitcher: false,<BR>>
visibility: false<BR>>
})<BR>><BR></DIV>> I悲 like to
start with Layer1 and Layer2 with visibility true ... How can<BR>>
I<BR>> do that?<BR>><BR>> Paul<BR>>
_______________________________________________<BR>> Users mailing
list<BR>> <A href="mailto:Users@geoext.org">Users@geoext.org</A><BR>> <A
href="http://www.geoext.org/cgi-bin/mailman/listinfo/users"
target=_blank>http://www.geoext.org/cgi-bin/mailman/listinfo/users</A><BR>><BR><BR><BR></BLOCKQUOTE></DIV><BR>
<P>
<HR>
<P></P>_______________________________________________<BR>Users mailing
list<BR>Users@geoext.org<BR>http://www.geoext.org/cgi-bin/mailman/listinfo/users<BR></BODY></HTML>