[Users] AsyncTreeNode without parent...
Georg Kaspar
georg at muenster.de
Mon Aug 16 10:26:33 CEST 2010
Thanks, but the problem still remains - there are two parent nodes for
each loader:
root o--|--o--o--|--o
| |--o
| |--o
|
|--o--o--|--o
|--o
|--o
what i need is a way to create a node from a loader only without a
parent node...
Am 12.08.2010 22:18, schrieb Adam Ratcliffe:
> Hi George,
>
> I think I may be doing something similar to what you're wanting to do,
> below is an excerpt from my TreePanel configuration.
>
> {
> autoScroll: true,
> animate: true,
> region: 'center',
> stateful: true,
> rootVisible: false,
> root: new Ext.tree.AsyncTreeNode({
> expanded: true,
> children: [{
> nodeType: 'gx_layercontainer',
> text: 'Layers',
> loader: new GeoExt.tree.LayerLoader({
> store: this.layerStore,
> filter: function(record) {
> var layer = record.get('layer');
> return !layer.isBaseLayer &&
> layer.displayInLayerSwitcher == true;
> },
> createNode: function(attr) {
> var layer = attr.layer;
> attr.iconCls = 'icon_' +
> this.getNameForGeometryClass(layer.geometryType).toLowerCase();
> return
> GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr);
> }
> }),
> layerStore: this.layerStore,
> leaf: false,
> expanded: true
> }, {
> nodeType: 'gx_layercontainer',
> text: 'Base Maps',
> loader: new GeoExt.tree.LayerLoader({
> store: this.layerStore,
> filter: function(record) {
> var layer = record.get('layer');
> return layer.isBaseLayer &&
> layer.displayInLayerSwitcher == true;
> },
> createNode: function(attr) {
> attr.iconCls = 'icon_map';
> return
> GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr);
> }
> }),
> layerStore: this.layerStore,
> leaf: false,
> expanded: true
> }]
> })
> }
>
> Cheers
> Adam
>
> On Thu, Aug 12, 2010 at 8:59 PM, Georg Kaspar <georg at muenster.de> wrote:
>> Hi there,
>>
>> I would like to create a TreePanel showing data from different WMS. For
>> each WMS' capabilities-xml-file, i have created an AsyncTreeNode using a
>> WMSCapabilitiesLoader. These Nodes are the appended to my root node. So
>> far so good - only problem is that there are two nodes on top of each
>> WMS' data, one being created by the WMSCapabilitiesLoader and one by the
>> AsyncTreeNode. Is there any way to create an AsyncTreeNode _only_ from
>> the data of an xml file without a new parentnode? Or can i use multiple
>> loaders within one node?
>> Hope i dit manage to make myself clear...;)
>> Thanks in advance & best regards,
>>
>> Georg
>> _______________________________________________
>> Users mailing list
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>>
>
More information about the Users
mailing list