<html>
<head>
</head>
<body>
Same thing. &nbsp;Now I don't have group header bars seperating my layers, but
all the layers still show up and when I click on a layer that has scale-specific
classes, the symbols for all scales still show up. &nbsp;By the way, I'm on Mapserver
3.6.1 and here's the page to go to if you want to see what I'm talking about:<br>
<br>
<a class="moz-txt-link-freetext" href="http://cnrit.tamu.edu/maps/map_init.html">http://cnrit.tamu.edu/maps/map_init.html</a><br>
<br>
Click on the very last button on that page (the one that says "FRAMES VERSION"
on it). &nbsp;When the map shows up, expand the "Regional" folder on the left-hand
side to display those layers. &nbsp;The one that I'm working on right now is called
"Parima Survey Households". &nbsp;Click on that layer to load it into the map,
then you'll see the various symbols I'm referring to show up in the legend.
&nbsp;I represent the Parima households with red triangle symbols and I have different
sized triangles depending on how far zoomed in you are so that they are small
at a high scale and larger as you zoom in...but I don't want all versions
of that symbol to show up in my legend all the time...just the one that's
in scale.<br>
<br>
Thanks again!<br>
<br>
Martin, Daniel wrote:<br>
<blockquote type="cite" cite="mid:4ACBA1414DD9EE418CC250E4AAA9035A16F347@STL-EXBE-I03.corp.erac.com">
  <meta content="MSHTML 5.50.4613.1700" name="GENERATOR">
  <div><span class="328113416-01102002"><font face="Arial" color="#0000ff" size="2">
Try  this.&nbsp; Take out the leg_group_html section, and the leg_layer_html section,
 leaving only the leg_class_html section.&nbsp; Take them out entirely - don't
 leave an empty set of tags.&nbsp; Then, let me know what  happens.</font></span></div>
  <div><span class="328113416-01102002"></span>&nbsp;</div>
  <div><span class="328113416-01102002"><font face="Arial" color="#0000ff" size="2">
-Dan</font></span></div>
  <blockquote>
    <div class="OutlookMessageHeader" dir="Ltr" align="Left"><font face="Tahoma" size="2">
-----Original Message-----<br>
    <b>From:</b> Mike Smith    [<a class="moz-txt-link-freetext" href="mailto:nospam@cnrit.tamu.edu">mailto:nospam@cnrit.tamu.edu</a>]<br>
    <b>Sent:</b> Tuesday, October 01, 2002 11:33    AM<br>
    <b>To:</b> Martin, Daniel<br>
    <b>Cc:</b>    <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.gis.umn.edu">mapserver-users@lists.gis.umn.edu</a><br>
    <b>Subject:</b> Re: [mapserver-users]    HTML Legend with Status Checking...<br>
    <br>
    </font></div>
Gladly. &nbsp;Here is    my legend code:<br>
    <br>
[leg_group_html]<br>
&nbsp;    &lt;tr&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td colspan=3    bgcolor=#cccccc&gt;&lt;b&gt;[leg_group_name]&lt;/b&gt;&lt;/td&gt;<br>
&nbsp;    &lt;/tr&gt;<br>
[/leg_group_html]<br>
    <br>
[leg_layer_html]<br>
[/leg_layer_html]<br>
    <br>
[leg_class_html]<br>
&nbsp;    &lt;tr&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;td    width=15&gt;&amp;nbsp;&lt;/td&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    &lt;td&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;img    src="[leg_icon width=15 height=15]" width=15    height=15&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    &lt;/td&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    &lt;td&gt;<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    [leg_class_name]<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    &lt;/td&gt;<br>
&nbsp; &lt;/tr&gt;<br>
[/leg_class_html]<br>
    <br>
    <br>
However, it    does not work as you say (and as the documentation on the
web page says!).    &nbsp;Layers that are "off" do not show up (that's as expected
and what I    want), that's fine, but layers that are out of SCALE DO show
up, and that's    not as expected and that's not as the documentation states
and that's NOT what    I want. &nbsp;For example, I have a layer called Ethiopia_Rivers...here's
what    it looks like:<br>
    <br>
LAYER<br>
&nbsp; NAME "Ethiopia_Rivers"<br>
&nbsp; TYPE    LINE<br>
&nbsp; STATUS off<br>
&nbsp; GROUP Ethiopia<br>
&nbsp; DATA    "ethiopia_rivers"<br>
&nbsp; HEADER    'ethiopia_rivers.shp_header.html'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;    CLASS<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MAXSCALE    8710165<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name 'Ethiopia    Rivers'<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 102 204    255<br>
&nbsp; &nbsp; &nbsp; &nbsp; TEMPLATE    ethiopia_rivers.shp_query.html<br>
&nbsp;&nbsp;&nbsp;&nbsp; END&nbsp; #    CLASS<br>
END&nbsp; # LAYER<br>
    <br>
Now, when I'm viewing my map at full extent,    my scale factor is 1:<font size="3"><b>
 20136789</b></font>, therefore if I    click on the Ethiopia_Rivers layer
at that zoom level, nothing shows up in the    map. &nbsp;This is the exact behavior
that I would expect...I'm out of scale    for that layer, so it doesn't show
up in the map until I zoom in. &nbsp;The    PROBLEM, however, is that the "Ethiopia
Rivers" icon and label pop up in my    legend...this is counter-intuitive,
contrary to the documented behavior of    Mapserver, and just flat-out frustrating!
&nbsp;If the layer is not showing up    in my map (because it's out of scale),
then it should NOT be in my legend    either. &nbsp;Grrrr!!! &nbsp;Pardon me for sounding
bitter...I'm not lashing    out at you, I'm very grateful for your help,
I'm just frustrated at    Mapserver.<br>
    <br>
Thanks!<br>
    <br>
Martin, Daniel wrote:<br>
    <blockquote cite="mid:4ACBA1414DD9EE418CC250E4AAA9035A192B33@STL-EXBE-I03.corp.erac.com" type="cite">
      <pre wrap="">Perhaps I misunderstood.  By default (no opt_flag set) layers that are out<br>of scale and layers that have a STATUS off will not show in an HTML legend.<br><br><br>A legend exactly like this should do exactly what it sounds like you want:<br><br>[leg_class_html]<br>&lt;TR&gt;<br>  &lt;TD&gt;<br>   &lt;img src="[leg_icon]" border=0&gt;<br>  &lt;/TD&gt;<br>  &lt;TD&gt;         <br>    &lt;font face="arial" size=2&gt;[leg_class_name]&lt;/font&gt;<br>  &lt;/TD&gt;<br>&lt;/TR&gt;<br>[/leg_class_html]<br><br>I'm not sure why you are having trouble getting the default action.  Perhaps<br>you could provide your current legend.<br><br>-Dan<br><br>-----Original Message-----<br>From: Mike Smith [<a class="moz-txt-link-freetext" href="mailto:nospam@cnrit.tamu.edu">mailto:nospam@cnrit.tamu.edu</a>]<br>Sent: Tuesday, October 01, 2002 10:59 AM<br>To: Martin, Daniel<br>Cc: <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.gis.umn.edu">mapserver-users@li!<br>
sts.gis.u<br>mn.edu</a><br>Subject: Re: [mapserver-users] HTML Legend with Status Checking...<br><br><br>Thank you, but this didn't change a thing.  Actually, let me correct <br>that...it had a negative effect because now all my layers show up too, <br>even if they are not displayed in the map.  I want only active layers to <br>show in the legend and I want only IN-SCALE class symbols to show up in <br>the legend, I don't want 4 symbols to show up in the legend for every <br>layer that I have which has scale-specific classes...I just don't guess <br>I can do that without converting everything over to Mapscript.  X-(<br><br>Any other ideas?<br><br>Martin, Daniel wrote:<br><br></pre>
      <blockquote type="cite">
        <pre wrap="">You probably want a bit mask of 2 in your opt_flag.  Layers with STATUS off<br>still show, but layers out of scale don't show.  <br><br>[leg_layer_html opt_flag=2]<br><br><br>Per <a class="moz-txt-link-freetext" href="http://mapserver.gis.umn.edu/doc36/html-legend-howto.html">http://mapserver.gis.umn.edu/doc36/html-legend-howto.html</a> :<br><br>1: If set, show layer even if out of scale (default: hide layers out of<br>scale). <br><br>2: If set, show layer even if status is OFF (default: hide layers with<br>STATUS OFF). <br><br>4: If set, show layer even if type is QUERY (default: hide layers of TYPE<br>QUERY) <br><br>8: If set, show layer even if type is ANNOTATION (default: hide layers of<br>TYPE ANNOTATION) <br><br><br>In my experience, opt_flag=2 is the most intuitive.<br><br>-Dan<br><br><br><br>-----Original Message-----<br>From: Mike Smith [<a class="moz-txt-link-freetext" href="mailto:nospam@cnrit.tamu.edu">mailto:nospam@cnrit.tamu!<br>.edu</a>]<br
>Sent: Mo<br>nday, September 30, 2002 5:06 PM<br>To: <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.gis.umn.edu">mapserver-users@lists.gis.umn.edu</a><br>Subject: [mapserver-users] HTML Legend with Status Checking...<br><br><br>Hello,<br><br>   I've seen how you can make legends using PHP Mapscript that check to <br>see whether a layer or class is in scale before displaying it in the <br>legend, but no mention of how to do this if I'm not using Mapscript.  I <br>have sub-classed many of my layers so that symbols show up in different <br>sizes depending on how far zoomed in you are.  In other words, I'm using <br>"MINSCALE" and "MAXSCALE" in my classes, but all of my classes show up <br>in the legend and that's really annoying!  I want ONLY the in-scale <br>symbol to show up in the legend as it does in the map...any tips on how <br>to do this without Mapscript?  I see the "if" conditional statements in <br>the HTML Legend How-to, but there's no status o
f "SCALE" to <br>check with <br>those statements... if I could put an if statement in my legend template <br>that checked whether or not a class or layer was in scale, then I'd be <br>in business...any way to do this?<br><br>Thanks!<br><br><br></pre>
        </blockquote>
        <pre wrap=""><!----><br><br><br></pre>
        </blockquote>
        <br>
        </blockquote>
        </blockquote>
        <br>
        </body>
        </html>