[Users] LegendPanel fires GetLegendGraphic requests for invisible Layers

Eric Lemoine eric.lemoine at camptocamp.com
Mon May 28 15:21:25 CEST 2012


On Thursday, May 24, 2012, Just van den Broecke wrote:

> Hi,
>
> I got much further in nailing down the issue: GeoExt will
> prefetch/preload Legends, WMS Legends via GetLegendGraphic, for all
> Layers where the "hideInLegend" record item is false/undefined, thus
> even if the Layer is not visible.
>
> I have fixed this and made this behaviour configurable via a
> "prefetchLegends" property for my class that derives from GeoExt
> LegendPanel. Also "hideInLegend" gets set in a Layer record when set for
> a Layer.
>
> See the code at:
>
> http://code.google.com/p/geoext-viewer/source/browse/trunk/heron/lib/widgets/LayerLegendPanel.js
> (Heron MC is a framework on top of GeoExt). Maybe the fix can be cleaned
> some, but for now this works. If found useful I may add this fix/feature
> to GeoExt via GitHub pull.



Hi. I think it would be a valuable addition. prefetchLegends should default
to false in my opinion.


-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20120528/61214a55/attachment.htm 


More information about the Users mailing list