<div>Ohh no :(</div>
<div>Any other alternative to solve that?</div>
<div> </div>
<div>ps.: Can you send that ticket url?</div>
<div> </div>
<div>Paul<br><br></div>
<div class="gmail_quote">On Wed, Oct 14, 2009 at 11:12 PM, Andreas Hocevar <span dir="ltr"><<a href="mailto:ahocevar@opengeo.org">ahocevar@opengeo.org</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">Andreas Hocevar wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Hi Paul,<br><br>the recommendations given so far should all work, but let Papa Treenode speak from his experience:<br>
<br>The best thing to do is override the createNode function of the loader, as documented in <a href="http://www.extjs.com/deploy/dev/docs/?class=Ext.tree.TreeLoader" target="_blank">http://www.extjs.com/deploy/dev/docs/?class=Ext.tree.TreeLoader</a>.<br>
</blockquote><br></div>which, unfortunately, will *not* work because GeoExt sets the visibility in the node's render method, regardless of its checked attribute. A tickdt with patch that fixes this would be in order I guess.<br>
<br>Regards,<br><font color="#888888">Andreas.</font>
<div>
<div></div>
<div class="h5"><br><br><br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote"><br>The createNode function is called with the attributes (attrs) as argument, so you could check for attr.text and then set attr.checked accordingly.<br>
<br>Regards,<br>Andreas.<br><br>Paul james wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">Thanks Matt...<br>I tried that:<br> nodeType: "gx_layer",<br> id: "Streets",<br>
layer: "Streets",<br> isLeaf: false,<br> expanded : true, loader: {<br> param: "LAYERS", baseAttrs: {<br>
uiProvider: Ext.extend(Ext.tree.TreeNodeUI, {<br> render: function(bulkRender) { if(this.node.text == "Layer3") this.node.layer.setVisibility(false); Ext.tree.TreeNodeUI.prototype.render.apply(this, arguments); }<br>
...<br> But all node´s layer are set off... How can I set the subnode´s visibility separately?<br> Thanks<br> Paul<br><br>On Wed, Oct 14, 2009 at 11:50 AM, Matt Priour <<a href="mailto:mpriour@kestrelcomputer.com" target="_blank">mpriour@kestrelcomputer.com</a> <mailto:<a href="mailto:mpriour@kestrelcomputer.com" target="_blank">mpriour@kestrelcomputer.com</a>>> wrote:<br>
<br> Handle the 'render' event of the layer tree and programmatically<br> uncheck the nodes that you don't want on.<br> The only disadvantage of this method is that depending on timing the<br> application may or may not attempt to do GetMap requests on the<br>
layers you don't want. Though they still would not be visible, if<br> you are calling a slow service or complex rendering is involved,<br> then the GetMap requests can block other WMS service requests.<br> Matt Priour<br>
Kestrel Computer Consullting<br> *From:* Paul james <mailto:<a href="mailto:pauljame@gmail.com" target="_blank">pauljame@gmail.com</a>><br> *Sent:* Wednesday, October 14, 2009 9:39 AM<br> *To:* <a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a> <mailto:<a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a>><br>
*Cc:* <a href="mailto:users@geoext.org" target="_blank">users@geoext.org</a> <mailto:<a href="mailto:users@geoext.org" target="_blank">users@geoext.org</a>> ; Andreas Hocevar<br> <mailto:<a href="mailto:ahocevar@opengeo.org" target="_blank">ahocevar@opengeo.org</a>><br>
*Subject:* Re: [Users] Set visibility on Sub-layers<br><br> Thanks bart...<br> But I need set all layers to build up my treeview, like that:<br> nodeType: "gx_layer",<br> layer: "Streets",<br>
isLeaf: false,<br> loader: {<br> param: "LAYERS",<br> ...<br> <br> On Wed, Oct 14, 2009 at 11:16 AM, <<a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a><br>
<mailto:<a href="mailto:bartvde@osgis.nl" target="_blank">bartvde@osgis.nl</a>>> wrote:<br><br> Hi Paul,<br><br> only by using LAYERS: ['layer1', 'layer2'].<br><br> Then later on, when you need more layers, you should change the<br>
LAYERS<br> param using the mergeNewParams function.<br><br> Best regards,<br> Bart<br><br> > Hello guys... I have that set of sublayers :<br> ><br> > new OpenLayers.Layer.MapServer("Streets",<br>
> _cgi, {<br> > map: _mapfile,<br> > "LAYERS":<br> ['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> > I悲 like to start with Layer1 and Layer2 with visibility true<br>
... How can<br> > I<br> > do that?<br> ><br> > Paul<br> > _______________________________________________<br> > Users mailing list<br> > <a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a> <mailto:<a href="mailto:Users@geoext.org" target="_blank">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><br> ------------------------------------------------------------------------<br>
<br> _______________________________________________<br> Users mailing list<br> <a href="mailto:Users@geoext.org" target="_blank">Users@geoext.org</a> <mailto:<a href="mailto:Users@geoext.org" target="_blank">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></blockquote><br><br></blockquote><br><br>-- <br>Andreas Hocevar<br>OpenGeo - <a href="http://opengeo.org/" target="_blank">http://opengeo.org/</a><br>
Expert service straight from the developers.<br></div></div></blockquote></div><br>