[Users] Error while try to display LegendGraphics in Layer Tree

Jehanzeb Orakzai jehanzeb_orakzai at yahoo.com
Mon Jul 19 14:27:25 CEST 2010


Hi,
 
I am receiving the following error while trying to display legend graphic in LayerContainer of Tree.
 
this.addEvents is not a function
"load"

The code that I am trying with is:
 
var mloader = GeoExt.tree.LayerLoader(
               {
                    createNode: function(attr)
                    {
                        attr.iconCls = this.store.getById(attr.layer.id).get('icon');
                        GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr);
                    }
               }
   );
 
   var layerCon = new GeoExt.tree.LayerContainer(
                    {
                        text: "Layers",
                        layerStore: mapPanel.layers,
                        loader: mloader,
                        expanded: true
                    }
    );

Can somebody point me out what I am doing wrong?
 
I have also looked at these mail threads but could'nt figure out problem in my code:
 
1. http://www.mail-archive.com/users@geoext.org/msg00392.html
 
2. http://www.mail-archive.com/users@geoext.org/msg00336.html
 
 
Any help is appreciated.
 
 
Thank you,
--
Jehanzeb


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20100719/72f776d6/attachment.htm 


More information about the Users mailing list