[Users] Error while try to display LegendGraphics in Layer Tree
Bart van den Eijnden (OSGIS)
bartvde at osgis.nl
Mon Jul 19 15:53:59 CEST 2010
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) <bartvde at osgis.nl>
> wrote:
>
>
> From: Bart van den Eijnden (OSGIS) <bartvde at osgis.nl>
> Subject: Re: [Users] Error while try to display LegendGraphics in Layer
> Tree
> To: "Jehanzeb Orakzai" <jehanzeb_orakzai at yahoo.com>
> Cc: "GeoExt" <users at geoext.org>
> 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/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
>
>
>
>
>
--
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