[Users] Error while try to display LegendGraphics in Layer Tree [SEC=Unclassified]
Matt Priour
mpriour at kestrelcomputer.com
Wed Jul 21 03:43:15 CEST 2010
I really like that fix, I will have to try that too.
Thanks so much for sharing.
Matt Priour
Kestrel Computer Consulting
--------------------------------------------------
From: "Miles Jordan" <Miles.Jordan at aad.gov.au>
Sent: Tuesday, July 20, 2010 6:58 PM
To: "'Jehanzeb Orakzai'" <jehanzeb_orakzai at yahoo.com>
Cc: "GeoExt" <users at geoext.org>
Subject: Re: [Users] Error while try to display LegendGraphics in Layer Tree
[SEC=Unclassified]
> Jehanzeb Orakzai wrote:
>> Hi Miles,
>>
>> Thank you for the reply.
>>
>> I have tried this also, but no luck. If u have a working example can
>> you post it please.
>>
>>
>> Thank you,
>
> This works for me with Ext 3.0, 3.1 and 3.2.1.
>
> createIconNode = function(attr) {
> var layer_name = ....;
> attr.icon =
> '/servicesproxy/geoserver/wms?REQUEST=GetLegendGraphic&VERSION=1.0.0&FORMAT=image/png&WIDTH=20&HEIGHT=20&LAYER='
> + layer_name;
> return GeoExt.tree.LayerLoader.prototype.createNode.call(this, attr);
> };
>
> And then the treepanel looks like:
>
> {
> xtype: "treepanel",
> loader: new Ext.tree.TreeLoader({
> applyLoader: false
> }),
> root: {
> nodeType: "async",
> children: {
> nodeType: "gx_overlaylayercontainer",
> text: 'Some Layers',
> layerStore: myLayerStore,
> leaf: false,
> expanded: true,
> loader: {
> createNode: createIconNode
> }
> }
> }
> }
>
>
> Regards,
>
> Miles
>
>
> ___________________________________________________________________________
>
> Australian Antarctic Division - Commonwealth of Australia
> IMPORTANT: This transmission is intended for the addressee only. If you
> are not the
> intended recipient, you are notified that use or dissemination of this
> communication is
> strictly prohibited by Commonwealth law. If you have received this
> transmission in error,
> please notify the sender immediately by e-mail or by telephoning +61 3
> 6232 3209 and
> DELETE the message.
> Visit our web site at http://www.antarctica.gov.au/
> ___________________________________________________________________________
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
More information about the Users
mailing list