[Users] LegendGraphics in Layer Tree [Sec=Unclassified]
Matt Priour
mpriour at kestrelcomputer.com
Tue Jul 6 03:10:09 CEST 2010
To make the layer nodes themselves each have unique graphic icon, you can do
2 possible things.
1. Don't use an overlay layer container or other such preconfigured layer
tree loader node type. Instead, use 'nodeType:"layerNode"' and give each
layer node an 'icon' property (to put the legend graphic url directly in the
tree configuration) or an 'iconCls' (to do it via CSS background images)
2. Go ahead and use one of the GeoExt layer tree loader node types and in
the baseAttrs property of the loader, assign a renderer function or assign a
function to the 'icon' attribute to allow you to calculate the icon path
automattically
If you just want to include a legend somewhere in the layertree panel, then
you can use one of the GeoExt legend widgets for that.
Matt Priour
Kestrel Computer
--------------------------------------------------
From: "Miles Jordan" <Miles.Jordan at aad.gov.au>
Sent: Monday, July 05, 2010 7:39 PM
To: <users at geoext.org>
Subject: Re: [Users] LegendGraphics in Layer Tree [Sec=Unclassified]
> Miles Jordan wrote:
>> Hi,
>>
>> Is it possible to put an icon representing each layer (legendgraphic)
>> in the layer tree? I've been searching for a good example to no avail.
>>
>
> I take it by the null response that it's not a straight forward thing in
> GeoExt to have a layer switcher that also displays a legend. Is that not a
> fundamental part of web mapping? I'm sure it can't be too hard, but either
> way, I'd really appreciate it if somebody could let me know! I just don't
> want to reinvent the wheel.
>
> Thanks,
>
> 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