[mapserver-users] layer_status always eq 0 with mode=legend and status ON
Steve.Toutant at inspq.qc.ca
Steve.Toutant at inspq.qc.ca
Thu Dec 2 08:39:12 PST 2010
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 <adube at mapgears.com>@lists.osgeo.org
Envoyé par : mapserver-users-bounces at lists.osgeo.org
2010-12-02 09:55
A
mapserver-users at 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.Toutant at 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 at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
--
Alexandre Dubé
Mapgears
www.mapgears.com
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20101202/b373e1d7/attachment.htm>
More information about the MapServer-users
mailing list