<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1476" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Jennifer,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>At the risk of asking a stupid question, by
selectively showing layers, you don't mean removing them from the map
altogether, do you? That would be a matter of removing them from the .map
file.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If you mean for the layer to show in the map, but
not in the legend, you would have to change the template file that your
legend_template widget uses. For example, you could put in an extra
IF-statement, which says:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>[if name=SHOWINLEGEND oper=isnull] </DIV>
<DIV>
<P>[/if]</FONT></P></DIV>
<DIV><FONT face=Arial size=2>Your legend_template.html file would
become:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2>[leg_layer_html order=ascending opt_flag=15]<BR>[if
name=SHOWINLEGEND oper=isnull] <BR> <tr
bgcolor="#ffffff"><BR> <td><input type="radio"
name="my_legend" onclick="CWCSelectLayer('[leg_layer_name]', true)"[if
name=selected value=1] CHECKED[/if] ></td><BR> <td
align="center" width=20><input type="checkbox" name="legendlayername[]"
<BR>value="[leg_layer_name]"<BR> [if name=layer_status
oper=eq value=1]CHECKED[/if]<BR> [if name=layer_status
oper=eq value=2]CHECKED[/if]></td><BR>
<td><img src="[leg_icon width=20 height=18]" width="20"
height="20"</td><BR> [if name=wms_name
oper=isnull]<BR> <td><a href="#"
onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span
class="label">[leg_layer_name]</span></a></td><BR>
</tr><BR> [/if]<BR> [if name=wms_name
oper=isset]<BR> <td><a href="#"
onclick="javascript:LegendTemplateLayerInfo('[leg_layer_name]');"><span
class="label">[metadata
name=WMS_TITLE]</span></a></td><BR>
</tr><BR>
[/if]<BR>[/if]<BR>[/leg_layer_html]<BR>--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Then all you'd have to do to make it not appear in
the legend, is put a tag called "SHOWINLEGEND" inside the METADATA tag of that
layer:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>LAYER</FONT></DIV>
<DIV><FONT face=Arial size=2> blah blah.....</FONT></DIV>
<DIV><FONT face=Arial size=2> METADATA</FONT></DIV>
<DIV><FONT face=Arial size=2> SHOWINLEGEND "nope"</FONT></DIV>
<DIV><FONT face=Arial size=2> END</FONT></DIV>
<DIV><FONT face=Arial size=2>END</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Hope this helps...</DIV>
<DIV> </DIV>
<DIV>Jacob</DIV></FONT></DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>-----Original Message-----<BR>From: <A
href="mailto:chameleon-bounces@lists.maptools.org">chameleon-bounces@lists.maptools.org</A>
[mailto:chameleon-bounces@lists.maptools.org] On Behalf Of Jennifer
Zeisloft<BR>Sent: 22 October 2004 09:10<BR>To: <A
href="mailto:Chameleon@lists.maptools.org">Chameleon@lists.maptools.org</A><BR>Subject:
[Chameleon] Selectively displaying layers in a legend</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>Hello All...</DIV>
<DIV> </DIV>
<DIV>I am extremely new to MapServer, Chameleon, etc. (and web
technology,<BR>for that matter), and I am wondering how I might show certain
layers<BR>and not others in a legend. I am working off of the
sample_enhanced<BR>files in the Chameleon sample applications. This uses
the legend<BR>template widget, but if something else would work better
for<BR>selectively showing layers, I'd be more than willing to attempt
using<BR>another widget.</DIV>
<DIV> </DIV>
<DIV>I am not all that familiar with the various code languages and I<BR>haven't
a clue which file would be the best to alter. Any help would<BR>be VERY
much appreciated! Thanks in advance.</DIV>
<DIV> </DIV>
<DIV>Jennifer Zeisloft<BR>(UW-Madison, Sea
Grant)<BR>_______________________________________________<BR>Chameleon mailing
list<BR><A
href="mailto:Chameleon@lists.maptools.org">Chameleon@lists.maptools.org</A><BR><A
href="http://lists.maptools.org/mailman/listinfo/chameleon">http://lists.maptools.org/mailman/listinfo/chameleon</A><BR></FONT></DIV></BODY></HTML>