<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
All,<br>
<br>
Hi all, I've been using the HTML legend for a while now with very good
results, I have a check box system working nicely showing when a layer
is on/off, etc.<br>
<br>
I was wondering, has anyone an example of setting it up to grey out a
checkbox if the scale of view is out of range (MINSCALE/MAXSCALE in the
mapfile). I have an idea of how it might be done, but not sure. Just
asking before I go at it from scratch.<br>
<br>
Here is my Legend TEMPLATE as it stands now along with a typical
MAPFILE entry, and a sample output on the end:<br>
<br>
<tt>MAPFILE ENTRY (one of many :c):<br>
<br>
</tt>
<blockquote><tt>METADATA</tt><br>
<tt> LEGEND_TITLE "Census Tract Centroids"</tt><br>
<tt> LEGEND_META_GROUP "foreground"</tt><br>
<tt> LEGEND_DISPLAY_LEVEL "1"</tt><br>
<tt>END</tt><br>
</blockquote>
<tt><br>
LEGEND TEMPLATE:<br>
<br>
</tt>
<blockquote><tt>[leg_header_html]</tt><br>
<tt>[/leg_header_html]</tt><br>
<br>
<tt>[leg_group_html]</tt><br>
<tt>[if name=first_foreground_layer oper=isset]
<b>Foreground:</b> <br /> [/if]</tt><br>
<tt>[if name=first_background_layer oper=isset]
<b>Background:</b> <br /> [/if]</tt><br>
<br>
<tt>[if name=legend_display_level oper=isset]</tt><br>
<tt>[if name=legend_display_level oper=neq value=-1]</tt><br>
<tt>[if name=layer_status oper=neq value=2]</tt><br>
<tt><input alt="[leg_group_name] Control"</tt><br>
<tt>[if name=legend_meta_group oper=eq value=foreground]
type="checkbox" [/if]</tt><br>
<tt>[if name=legend_meta_group oper=eq value=background] type="radio"
[/if]</tt><br>
<tt>name="layer" value="[leg_group_name]"</tt><br>
<tt>[if name=layer_status oper=neq value=0] checked="checked" [/if]
/></tt><br>
<tt>[if name=group_maxscale oper=isset]</tt><br>
<tt><input type="hidden" name="[leg_group_name]_Maxscale"
value="[metadata name=group_maxscale]" /></tt><br>
<tt>[/if]</tt><br>
<tt>[if name=group_minscale oper=isset]</tt><br>
<tt><input type="hidden" name="[leg_group_name]_Minscale"
value="[metadata name=group_minscale]" /></tt><br>
<tt>[/if]</tt><br>
<tt><img alt="[leg_group_name] Legend Image"
name="[leg_group_name]LegendImg" src="[leg_icon]" width="21"
height="14" /></tt><br>
<tt>[/if]</tt><br>
<tt>[if name=metadata_url oper=isset]</tt><br>
<tt><a href='<a class="moz-txt-link-freetext" href="javascript:var">javascript:var</a> temp = window.open("[metadata
name=METADATA_URL]", "meta",
"resizable,scrollbars,location,toolbar,height=300,width=500")'></tt><br>
<tt>[/if]</tt><br>
<tt>[if name=legend_title oper=isset]</tt><br>
<tt>[metadata name=LEGEND_TITLE]</tt><br>
<tt>[/if]</tt><br>
<tt>[if name=metadata_url oper=isset]</tt><br>
<tt></a></tt><br>
<tt>[/if]</tt><br>
<tt><br /></tt><br>
<tt>[/if]</tt><br>
<tt>[/if]</tt><br>
<tt>[/leg_group_html]</tt><br>
<br>
<br>
<tt>[leg_layer_html opt_flag=0]</tt><br>
<tt>[if name=legend_display_level oper=isset]</tt><br>
<tt>[if name=legend_display_level oper=eq value=2]</tt><br>
<tt><img alt="Group Legend Image" src="[leg_icon]" width="21"
height="14" /><br /><span
class="small">[leg_layer_name]</span><br /></tt><br>
<tt>[/if]</tt><br>
<tt>[/if]</tt><br>
<tt>[/leg_layer_html]</tt><br>
<br>
<br>
<tt>[leg_class_html opt_flag=0]</tt><br>
<tt>[if name=legend_display_level oper=isset]</tt><br>
<tt>[if name=legend_display_level oper=eq value=3]</tt><br>
<tt><img alt="Class Legend Image" src="[leg_icon]" width="21"
height="14" /><br /><span
class="small">[leg_class_name]</span><br /></tt><br>
<tt>[/if]</tt><br>
<tt>[/if]</tt><br>
<tt>[/leg_class_html]</tt><br>
<tt>[leg_footer_html]</tt><br>
<tt>[/leg_footer_html]</tt><br>
</blockquote>
<tt><br>
<br>
OUTPUT:</tt><br>
<blockquote>
<pre id="line149"><<span class="start-tag">input</span><span
class="attribute-name"> alt</span>=<span class="attribute-value">"bg_mntrct00_point Control" </span>
<span class="attribute-name">type</span>=<span class="attribute-value">"checkbox" </span><span
class="attribute-name">name</span>=<span class="attribute-value">"layer" </span><span
class="attribute-name">value</span>=<span class="attribute-value">"bg_mntrct00_point" /></span>
<span class="attribute-name"></span><span class="attribute-value"></span>
<<span class="start-tag">img</span><span class="attribute-name"> alt</span>=<span
class="attribute-value">"bg_mntrct00_point Legend Image" </span><span
class="attribute-name">name</span>=<span class="attribute-value">"bg_mntrct00_pointLegendImg" </span><span
class="attribute-name">src</span>=<span class="attribute-value">"/tmp/view_27723_1158975512_22_0_20_12.png" </span><span
class="attribute-name">width</span>=<span class="attribute-value">"21" </span><span
class="attribute-name">height</span>=<span class="attribute-value">"14" </span><span
class="attribute-name">/</span>>
Census Tract Centroids
</pre>
<pre id="line172"><<span class="start-tag">br</span><span
class="attribute-name"> /</span>></pre>
<br>
</blockquote>
<br>
</body>
</html>