[Users] Set visibility on Sub-layers
Andreas Hocevar
ahocevar at opengeo.org
Thu Dec 10 20:14:55 CET 2009
On 2009-12-10 19:11, Paul james wrote:
> Thanks Andreas...
> But I dint get that...
> I´m trying figure out how that allItems array and method onCheckChange
> should work, without success..
> That bug occurs always that I have a sublayer with checked true and
> two or more sublayers with checked false...
>
> Please please help me :(
There are two solutions I can think of:
* provide allItems in the configuration instead of using getItems() in
the render method (in LayerParamNode.js).
* determine allItems before the node is rendered. Either in the node
constructor (if layer provided as object) or in a listener for the
layerStore's update event.
The latter is obviously more elegant, but more effort to implement.
Regards,
Andreas.
>
> Paul
>
>
> On Wed, Dec 9, 2009 at 6:08 AM, Andreas Hocevar <ahocevar at opengeo.org
> <mailto:ahocevar at opengeo.org>> wrote:
>
> Hi,
>
> I guess the problem is that allItems will be set incorrectly for some
> layers. My patch calls onCheckChange when it finds a checked attribute
> on the layer node. If this is set to false, it will turn off the
> layer,
> removing the layer from the params. Layers that get created after that
> will miss that layer in their allItems array.
>
> I don't have time to look for a solution now, but maybe the
> information
> above is enough for you to figure out one.
>
> Regards,
> Andreas.
>
--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20091210/c6df5329/attachment-0001.htm
More information about the Users
mailing list