[Users] Fwd: GeoExt.LegendPanel too slow with too many sublayers
Vito Meuli
v.meuli at tecnologieavanzate.it
Tue May 11 10:26:06 CEST 2010
Thank you Andreas.
I create the LegendPanel "just in time" when the user clicks on the button "Legenda" (=Legend), that is when the page is already fully loaded, like the LayerTree.
So my code follows your idea yet...but LegendPanel loads all of the sublayers the same, even those off.
Now I'm going to deploy everything on the production server, so you will have the chance to see the code in action, if you want.
Regards,
Vito
----- Messaggio originale -----
Da: "Andreas Hocevar" <ahocevar at opengeo.org>
A: "Vito Meuli" <v.meuli at tecnologieavanzate.it>
Cc: "GeoExt Users" <users at geoext.org>
Inviato: Martedì, 11 maggio 2010 9:42:23 GMT +01:00 Amsterdam/Berlino/Berna/Roma/Stoccolma/Vienna
Oggetto: Re: [Users] Fwd: GeoExt.LegendPanel too slow with too many sublayers
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
More information about the Users
mailing list