[Users] Parent and Child Nodes (Layers) with gx_layercontainers

Brian Marble brianmarble at landez.com
Thu Feb 18 19:27:10 CET 2010


 

I am trying to add children nodes to the children of root in a treepanel to
categorize layers (ie Layers-->Over Layers-->Red Over Layers and Blue Over
Layers and etc . See ".Node 1.3" and ".Node 1.3.1" in code below. 

 

The code below works great except for Node 1.3.1. When I click to show the
list of layers I get the revolving daisy, forever. I seem to be adding
children nodes incorrectly.

 

What am I missing in my Parent and Children attributes?

 

Thanks,

Brian

 

var tree = new Ext.tree.TreePanel({

.

root: {

            nodeType: "async",

            children: [{

                                nodeType: "gx_baselayercontainer",

                                text: "Base Layers - Node 1.2",

                                expanded: false

                                },{

                                text: "Over Layers (non gx) - Node 1.3",

                                expanded:false,

                                childNodeType: "gx_layercontainer",

                                children: [{

                                                text: "Red Over Layers -
Node 1.3.1",

                                                expanded: false,

                                                loader: {

                                                                filter:
function(record) {

                                                                var layer =
record.get("layer");

                                                                 return
layer.name.indexOf("Red") !== -1

                                                }}},{

                                                text: "Blue Over Layers -
Node 1.3.2",

                                                expanded: false,

                                                loader: {

                                                                filter:
function(record) {

                                                                var layer =
record.get("layer");

                                                                 return
layer.name.indexOf("Blue") !== -1

                                                }}}

                                                }]

                                },{

                                text: "MoreLayers - Node 1.4 ",

                                nodeType: "gx_layercontainer",

                                expanded:false,

                                loader: {

                                                filter: function(record) {

                                                var layer =
record.get("layer");

                                                return
layer.name.indexOf("MyParameter2") !== -1

                                                }}

                                },  .

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20100218/2851e27a/attachment-0001.htm 


More information about the Users mailing list