Hi, just an idea (untested): try to create your LegendPanel *after* the tree, and after the map is rendered (e.g. in the Tree's or the MapPanel's "render" event).
The reason why I think this should work is because the tree, while it builds, will cause the layers to be configured with *only* the *visible* sublayers. Regards, Andreas. On May 11, 2010, at 09:12 , Vito Meuli wrote: > [Cross posting from Mapfish-Users] > > Hi list! > I'm facing a problem with my first production-lever webgis realized with > Mapfish+GeoExt. > > The customer requires a lot of WMS Layers (about 30), each Layer having a lot > of sublayers, so I have about 300 sublayers in my map...non all displayed, of > course! :-) > They are in a mapfish.widgets.LayerTree, some displayed and a lot of them off. > > I'm displaying the legend by means of a GeoExt.LegendPanel. > > Now the problem is that GeoExt.LegendPanel loads all of the sublayers images, > without considering weather the Layers are on or off...you can imagine it > takes 2 minutes to load the LegendPanel! > No good. > > I'm using old (some months) version of Mapfish and GeoExt... > What version are they? I don't know! How can I tell from the code what > version are they? > (I messed up code folders from different version in the process of solving > some bugs in the last few months). > > I cannot find any message in the list about such a problem. > > Can you advise some solution? > * New version of GeoExt? > * Any parameter that can correct the bad behaviour? > > * Reducing the number of sublayers, I know it shoud be done, but it costs a > lot of data analisys to understand which sublayers can be merged in a single > sublayer. > > I'll have the webgis published in a few days, if you need to look at the code. > > Thank you in advance! > Cheers > Vito Meuli > -- > ing. Vito Meuli > Tecnologie Avanzate s.r.l. > via B. Croce 49 > 70015 Noci > BARI > > web: www.tecnologieavanzate.it > tel. +390804979652 > fax. +390804979263 > > -- > ing. Vito Meuli > Tecnologie Avanzate s.r.l. > via B. Croce 49 > 70015 Noci > BARI > > web: www.tecnologieavanzate.it > tel. +390804979652 > fax. +390804979263 > _______________________________________________ > Users mailing list > [email protected] > http://www.geoext.org/cgi-bin/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://www.geoext.org/cgi-bin/mailman/listinfo/users
