need urgent help with the Legend Template

Ishrar Hussain ishrarh at YAHOO.COM
Tue Feb 28 14:55:12 EST 2006


Hello everyone,

I need some particular layer-groups of my map file to
stop appearing in the legend. I only show the
layer-groups in my legend with a template as follows:

[leg_group_html Opt_Flag=15]
<tr>
  <td align="center"><input type="checkbox"
name="layer_status[]" value="[leg_group_name]" [if
name=layer_status oper=eq  value=1]CHECKED[/if][if
name=layer_status oper=eq value=2]CHECKED[/if]></td>
  <td><img src="[leg_icon height=10 width=20]"
height=10 width=20></td>
  <td><font face="Arial, Helvetica, sans-serif"
size="2">[leg_group_name]</font></td>
</tr>
[/leg_group_html]


Now, I do not want to give the user to ability to turn
off the visibility of a few layer-groups, specially
the ones that defines the main map. I do not want to
change the structure of my map file either (i.e.
putting some layers without any group). I tried
disabling the checkboxes by changing the code as
follows:

[leg_group_html Opt_Flag=15]
<tr>
  <td align="center"><input type="checkbox"
name="layer_status[]" value="[leg_group_name]" [if
name=layer_status oper=eq  value=1]CHECKED[/if][if
name=layer_status oper=eq value=2]CHECKED[/if] [if
name=layer_group oper=eq
value="Map"]DISABLED[/if]></td>
  <td><img src="[leg_icon height=10 width=20]"
height=10 width=20></td>
  <td><font face="Arial, Helvetica, sans-serif"
size="2">[leg_group_name]</font></td>
</tr>
[/leg_group_html]


But, it did not work, since "[if name=layer_group
...]" works only in context of "leg_layer_html", which
I do not use.

Can anyone please help me by showing how to stop some
particular layer-groups from appearing in the legend
by using some kind of conditions in "leg_group_html"
tag ?

Looking forward to your early response.

Regards,
Ishrar


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the mapserver-users mailing list