[Users] Error while try to display LegendGraphics in Layer Tree
Bart van den Eijnden (OSGIS)
bartvde at osgis.nl
Mon Jul 19 14:36:53 CEST 2010
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/users@geoext.org/msg00392.html
>
> 2. http://www.mail-archive.com/users@geoext.org/msg00336.html
>
>
> Any help is appreciated.
>
>
> Thank you,
> --
> Jehanzeb
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> 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
bartvde at osgis.nl
More information about the Users
mailing list