[Users] Set visibility on Sub-layers

Paul james pauljame at gmail.com
Fri Dec 11 19:41:12 CET 2009


I tested ...
Thats working now...

Thanks !

Paul

On Fri, Dec 11, 2009 at 3:15 PM, Andreas Hocevar <ahocevar at opengeo.org>wrote:

> Thanks for your investigation.
>
> I have created a patch based on your findings. Can you please test if
> the patch attached to http://trac.geoext.org/ticket/186 also fixes your
> issue and report back?
>
> Regards,
> Andreas.
>
> On 2009-12-11 18:25, Paul james wrote:
> > Thanks...
> > It愀 working now...
> > I added that code in contructor
> >  ...
> >    for (i=0;i< mapPanel.layers.map.layers.length;i++)
> >         {
> >             if(mapPanel.layers.map.layers[i].name == config.layer)
> >             {
> >                 this.allItems =
> > mapPanel.layers.map.layers[i].params.LAYERS;
> >                 break;
> >             }
> >         }
> > ...
> > And removed
> > this.allItems = this.getItems()
> > from render method...
> >
> > Paul
> > On Thu, Dec 10, 2009 at 4:14 PM, Andreas Hocevar <ahocevar at opengeo.org
> > <mailto:ahocevar at opengeo.org>> wrote:
> >
> >     On 2009-12-10 19:11, Paul james wrote:
> >>     Thanks Andreas...
> >>     But I dint get that...
> >>     I惴 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.
> >
> >
> >
>
>
> --
> 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/20091211/54ddd443/attachment.htm 


More information about the Users mailing list