Hi Bart, Sorry I forget to put list address in cc. My problem is still there, giving me the same error, pointing towards LayerLoader.js
Thank you, -- Jehanzeb --- On Mon, 19/7/10, Bart van den Eijnden (OSGIS) <[email protected]> wrote: From: Bart van den Eijnden (OSGIS) <[email protected]> Subject: Re: [Users] Error while try to display LegendGraphics in Layer Tree To: "Jehanzeb Orakzai" <[email protected]> Cc: [email protected] Date: Monday, 19 July, 2010, 18:53 Always reply to the list please,. Loader needs to get an instance, so: loader: new mloader(), Best regards, Bart > I have tried like this but still its not working and give me the same > error: > > var mloader = Ext.extend(GeoExt.tree.LayerLoader( > { > createNode: function(attr) > { > attr.iconCls = > this.store.getById(attr.layer.id).get('icon'); > > GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr); > } > } > )); > > > > Thank you, > -- > Jehanzeb > > --- On Mon, 19/7/10, Bart van den Eijnden (OSGIS) <[email protected]> > wrote: > > > From: Bart van den Eijnden (OSGIS) <[email protected]> > Subject: Re: [Users] Error while try to display LegendGraphics in Layer > Tree > To: "Jehanzeb Orakzai" <[email protected]> > Cc: "GeoExt" <[email protected]> > Date: Monday, 19 July, 2010, 17:36 > > > Use Ext.extend to extend GeoExt.tree.LayerLoader. > > Best regards, > Bart > >> 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/[email protected]/msg00392.html >> >> 2. http://www.mail-archive.com/[email protected]/msg00336.html >> >> >> Any help is appreciated. >> >> >> Thank you, >> -- >> Jehanzeb >> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://www.geoext.org/cgi-bin/mailman/listinfo/users >> > > > -- > Looking for flexible support on OpenLayers or GeoExt? Please check out > http://www.osgis.nl/support.html > > Bart van den Eijnden > OSGIS > [email protected] > > > > > -- Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html Bart van den Eijnden OSGIS [email protected]
_______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
