Hello GeoExt/ExtJS list,<br><br>I am just having trouble with one thing after another. I have a layer that I create after my tree panel has been created ( I have my reasons, getting the map's extent of the viewport returns null if I try to use getExtent() before the viewport has been created and I need getExtent() as parameters to create this new layer. So what I have done is created a layerNode that I want to add to a container for this layer. However this node does not take the form of a radio button, which I believe it should, nor does it match up to serve functionality to toggle the layer on and off, instead it throws an error in firebug:<br>
<br><div class="errorTitle focusRow
subLogRow ">this.node.getOwnerTree() is null</div><span class=" "></span><div class="errorSourceBox errorSource-show focusRow
subLogRow "><img src="chrome://firebug/content/blank.gif" title="Break on this error" class="errorBreak a11yFocus "><a class="errorSource a11yFocus ">
var checkedNodes = this.node.getOwnerTree().getChecked();<br><br>http://localhost:8080/geoserver/www/GeoExt/lib/GeoExt/widgets/tree/LayerNode.js<br>Line 84<br><br>//function to create the original child overlay container with radio buttons<br>
</a></div><span class="objectBox objectBox-errorMessage
hasBreakSwitch "><br>function childContainerRadioButtons(text, layerStore, parent, iconCls){<br> <br> parent.appendChild(new GeoExt.tree.OverlayLayerContainer({<br> text: text,<br> layerStore: layerStore,<br>
expanded: true,<br> iconCls: iconCls, //If not specified, defaults to original image<br> loader:{<br> baseAttrs:{<br> checkedGroup: "foo"<br> }<br> }<br>
}));<br> <br>}//end childContainerRadioButtons<br><br>//TreePanel code<br><br>//Tree menu for layers<br> var layerTree = new Ext.tree.TreePanel({<br> overflow: 'visible', // For the Combo popup<br>
region: "west",<br> title: "Map Layers", <br> root: layerRoot,<br> loader: new Ext.tree.TreeLoader({applyLoader: false}),<br> enableDD: true,<br>
collapsible: true,<br> width: 300,<br> autoScroll: true,<br> expanded: false<br> });<br><br>//The node I want to add to that child overlay container<br>
<br>layerStore.loadData([vectorPano], true); //adding layer to the layerstore of that container<br> var layerContainer = layerRoot.findChild('text', 'Photo Layers');<br> layerContainer.appendChild(new GeoExt.tree.LayerNode({<br>
leaf: true,<br> text: 'Panoramio Photos',<br> layer: vectorPano,<br> layerStore: layerStore,<br> loader: {baseAttrs: {checkedGroup: "foo"}}, //This node is the odd one out, rendering a checkbox while it siblings are radio buttons<br>
checked: false<br> }));<br><br>I've been stuck for a while, any hints would be greatly appreciated. I thought I'd be able to get it on my own if I had the other issues resolved (asked recently) and I apologize for asking all the questions. I'm just having a hard time :-/<br>
<br>Thanks in advance for your continuous kind help :)<br><br>elshae<br></span>