[Mapbender-dev] mod_treefolder2

Michael Schulz mschulz at webgis.de
Fri Nov 30 06:41:42 EST 2007


Hi Melchior,

that's what I did:
- read in the documentation, that "on/off" (gui_layer_status) decides
whether a layer is present in the tree, "sel" (gui_layer_selectable)
decides whether a layer is selectable by the user in the tree
- when looking at the original code of the second part of the patch
(line 537): the outer if checks whether gui_layer_selectable is 1, but
then inside it checks if gui_layer_selectable is != 1 (if so it adds
disabled, which is exactly what we want), but you only get there if
gui_layer_queryable is 1!? That means you only can set a layer
visibility checkbox disabled, when it is queryable.

I think, gui_layer_status should be checked first and only, because
this is the main decision whether a layer should appear in the tree.
Then if gui_layer_selectable is 0 the visibility checkbox is disabled
but present and even checked when sel_default is set to 1.

At the moment, with the patch applied, a layer that has sel=0 is
simply not present in the tree, which I think is not the intended
behaviour.

Additionally, in my reading of the functionality, if you set sel=0 on
layer 0 of a wms and have switch_wms set to true, then this wms
checkbox should also be disabled.

Cheers, Michael


2007/11/30, Melchior Moos <nimix at gmx.net>:
> Hi,
> I had a short look at it, the behavior of treefolder2 in trunk should be
> like the old treefolder.php (line 605), but I'm not sure if that was the
> correct way??
> regards,
> Melchior
> > Hi,
> >
> > I know there is currently work done at improving mod_treefolder2, but
> > nevertheless, this might make it into 2.4.4.
> >
> > I think there is a confusion in mod_treefolder2.php: To decide whether
> > a layer should be ignored in the tree, it currently checks for
> > gui_layer_selectable but should check against gui_layer_status.
> >
> > trunk:
> > - lines 513 + 549
> > 2.4.3:
> > - the check whether layer 0 has status=0 is not present (BTW: if this
> > is the case it should actually continue to the next wms not only to
> > the next layer, in my opinion)
> > - line 537
> >
> > Any other thoughts on this?
> >
> > Cheers, Michael
> >
> >
>
> _______________________________________________
> Mapbender_dev mailing list
> Mapbender_dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapbender_dev
>


-- 
-----------------------------------------------------------
Michael Schulz
mschulz at webgis.de

in medias res
Gesellschaft für Informationstechnologie mbH

In den Weihermatten 66
79108 Freiburg

Tel  +49 (0)761 556959-5
Fax +49 (0)761 556959-6

http://www.webgis.de / http://www.zopecms.de
-----------------------------------------------------------


More information about the Mapbender_dev mailing list