I did try with and without oper=eq, and the behaviour is the same. I noticed here http://mapserver.org/output/html_legend.html that layer_status is a supported tag in the group block (leg_group_html) but not in a layer block (leg_layer_html) which I'm using. Is the documentation up to date on this?
I'm using the result of mode=legend, to populate a geoext layertree. What I'm trying to accomplish is to set the initial visibility parameter of the layer tree node. I thought that using the layer_status value would be a good solution... Is it a bug or my approach is not right? thanks steve Alexandre Dube <ad...@mapgears.com>@lists.osgeo.org Envoyé par : mapserver-users-boun...@lists.osgeo.org 2010-12-02 09:55 A mapserver-users@lists.osgeo.org cc Objet Re: [mapserver-users] layer_status always eq 0 with mode=legend and status ON Steve, I'm really not sure about this, but I think you need to specify the 'oper' parameter, as such : aszLegendArray[szGroup][nLayerId]["selected"] = [if name=layer_status oper=eq value=0]0[/if][if name=layer_status oper=eq value=1]1[/if][if name=layer_status oper=eq value=2]1[/if]; That's the way all samples in the doc page [1] are displayed. HTH, Alexandre [1] http://mapserver.org/output/html_legend.html On 10-12-02 09:36 AM, steve.tout...@inspq.qc.ca wrote: Hi, I'm starting using mode=legend and I cannot get the proper STATUS value of my layers definition when STATUS is ON. My mapfile contains 3 layers, one layer has STATUS ON, another STATUS DEFAULT and the other STATUS OFF In the result of mode=legend I get layer_status = 0 for layers having STATUS ON or OFF. I get layer_status = 2 when STATUS = DEFAULT Here is the line in the template aszLegendArray[szGroup][nLayerId]["selected"] = [if name=layer_status value=0]0[/if][if name=layer_status value=1]1[/if][if name=layer_status value=2]1[/if]; Should layer_status be equal to 1 when STATUS ON? thanks Steve _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Alexandre Dubé Mapgears www.mapgears.com _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users