View Full Version : Adding a Node After A Tree Has Been Created

29 Nov 2010, 7:06 AM
Hello ExtJS 3.X,

I have a tree panel where I'd like to add a single node that corresponds to a map layer after the tree panel and layer container have been created. So far I have been able to create that node and have it attached to the proper layer container, but it gives errors when it is toggled on and off. Below is my portion of the code for the node. I'd also like to mention that this error may just be spawning from the fact that this map layer is created from the JSON received by another server and is probably asynchronous. If this is the case, how can I create this layer node so that it binds to this particular layer?

layerStore.loadData([vectorPano], true);

layerRoot.getOwnerTree().getNodeById('photos').appendChild(new GeoExt.tree.LayerNode({
layer: vectorPano,
//nodeType: 'gx_layer',
layerStore: layerStore,
checkedGroup: 'foo',
checked: false