[mapserver-users] layer_status always eq 0 with mode=legend and status ON

Alexandre Dube adube at mapgears.com
Thu Dec 2 09:55:45 EST 2010


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20101202/ce2ef618/attachment.html


More information about the mapserver-users mailing list