[Mapserver-users] group blocks in legends

Valerio noti at ciaoweb.it
Wed Jul 16 07:14:41 EDT 2003


Hi all,
I need to use groups in html legend template. I have many cartographic files
that I'd like to view simply by clicking in a single checkbox.
The questions are:
1) Is it possible to apply opt_flags in group blocks as for layers and
classes? I'd like to not display in legend groups out of the min and
maxscale ranges.

My legend_template html file is:
#########################
[leg_group_html]
<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>&nbsp;</td>
<td><b><font face="Verdana,Arial, Helvetica, sans-serif" size="1"
color="#0000C0">[leg_group_name]</font></b></td></tr>
[/leg_group_html]
#########################

and for each layer in mapfile I assigned a group name even if that group
contains only one layer:

#########################
LAYER
NAME "lines"
GROUP "lines"
TYPE LINE
STATUS OFF
DATA lines
CLASSITEM 'FOGLIO'
CLASS
NAME "lines"
EXPRESSION /./
OUTLINECOLOR 0 0 0
COLOR 255 0 0
END
END
#########################

Thanks in advance

Valerio







More information about the mapserver-users mailing list