[Users] filter wms layers in legend

ivan marchesini ivan.marchesini at gmail.com
Fri Dec 17 12:02:17 CET 2010


Dear GeoExt users..
my GeoExt application use a GeoExt.LegendPanel object

I have a lot of wms layers (67) added to the mapPanel.
only two of these layers has visibility: true.

It happen that each time I load the webpage the legend panel start to
ask for the legend of each layer.

that creates a lot of getLegend call towards the wms server which become
unstable...

I would like to filter the layers to be displayed in the legendPanel by
means of the visibility property... 

in this way when I swich on another layer from the layers tree the
legendPanel should execute the getLegend call.

it seem that using this filter inside the GeoExt legendPanel object is
not correct...

filter: function(record) {
		return mapPannel.map.getLayersBy('visibility',true)
		}

please give me some help...

thanks

Ivan



-- 
Ti prego di cercare di non inviarmi files .dwg, .doc, .xls, .ppt.
Preferisco formati liberi.
Please try to avoid to send me .dwg, .doc, .xls, .ppt files.
I prefer free formats.
http://it.wikipedia.org/wiki/Formato_aperto
http://en.wikipedia.org/wiki/Open_format

Ivan Marchesini
Perugia (Italy)
Socio fondatore GFOSS "Geospatial Free and Open Source Software" http://www.gfoss.it
e-mail: marchesini at unipg.it
        ivan.marchesini at gmail.com
fax (home): +39(0)5782830887
jabber: geoivan73 at jabber.org
skype: geoivan73
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Questa =?ISO-8859-1?Q?=E8?= una parte del messaggio
 firmata digitalmente
Url : http://www.geoext.org/pipermail/users/attachments/20101217/09cb62a9/attachment.pgp 


More information about the Users mailing list