[mapserver-users] Scaleable symbols (WAS: HTML Legend with St atus Checking...)

Martin, Daniel DMartin@erac.com
Tue, 1 Oct 2002 15:53:43 -0500


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------=_NextPartTM-000-f8c91402-d57b-11d6-bb09-00508bcfdcc7
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C2698C.A112F964"

------_=_NextPart_001_01C2698C.A112F964
Content-Type: text/plain;
	charset="iso-8859-1"

To be honest, I have very little experience with scaleable symbols...I just
know MapServer has support for them.  In the documentation,
http://mapserver.gis.umn.edu/doc36/mapfile-reference.html
<http://mapserver.gis.umn.edu/doc36/mapfile-reference.html>  see:
 
SYMBOLSCALE under the LAYER object
 
MINSCALE, MAXSCALE under the CLASS object
 
Others can spread more light on scaleable symbols than I can, I'm sure.
 
-Dan

-----Original Message-----
From: Mike Smith [mailto:nospam@cnrit.tamu.edu]
Sent: Tuesday, October 01, 2002 3:40 PM
To: Martin, Daniel
Cc: mapserver-users@lists.gis.umn.edu
Subject: Re: [mapserver-users] HTML Legend with Status Checking...


OK, I'll buy that.  I'm disappointed to hear that, though, because my .map
file is 3400 lines long and I've got 4 versions of it to alter each time I
make a change because I provide users a java-applet based version of the
page and a non-applet version, as well as large and small map
variations...OUCH!  This is going to be very tedious to implement, but I
guess that's what I get paid for!  :-) 

About the scaleable symbols...I'm not using them because I don't know what
they are?  I've got a symbols.sym file defined (that I took from the maplab
tar archive) and it's got a bunch of symbols defined in it and I scale them
with the "SIZE" keyword in my map file...is there something else I could do?
What exactly is a "scaleable symbol"?

Thanks very much for your help!

Martin, Daniel wrote:


It's all clear now.  Sorry for the misunderstanding.
 
AFAIK, classes don't have a status you can access in the HTML legend like
layers (unfortunately).  What I know will work (because I do it all the
time) is creating 4 separate layers each with 1 and only 1 class and moving
your MINSCALE and MAXSCALE settings to the layer object.  Give all the
layers the same name (very important).  
 
This will perform exactly the same since you have no crossover of scale, and
the HTML legend will perform as you expect it to.  
 
On a separate subject, you might be better off using scaleable symbols
rather than your current solution.  But, perhaps you have reasons for not
using them.
 
-Dan
 
 -----Original Message-----
From: Mike Smith [ mailto:nospam@cnrit.tamu.edu
<mailto:nospam@cnrit.tamu.edu> ]
Sent: Tuesday, October 01, 2002 2:43 PM
To: Martin, Daniel
Cc: mapserver-users@lists.gis.umn.edu
<mailto:mapserver-users@lists.gis.umn.edu> 
Subject: Re: [mapserver-users] HTML Legend with Status Checking...



LAYER
  NAME Parima_Surveyhouseholds
  GROUP Region
  TYPE Point
  STATUS off
  DATA parima_surveyhouseholds
  HEADER 'parima_surveyhouseholds.shp_header.html'
  TEMPLATE parima_surveyhouseholds.shp_query.html

      CLASS
        MINSCALE 20136780
        Name 'Parima Survey Households'
        SYMBOL 'triangle'
        SIZE 5
        COLOR 255 0 0
        OUTLINECOLOR 0 0 0
     END  # CLASS

      CLASS
        MINSCALE 10068390
        MAXSCALE 20136779
        Name 'Parima Survey Households'
        SYMBOL 'triangle'
        SIZE 8
        COLOR 255 0 0
        OUTLINECOLOR 0 0 0
     END  # CLASS

      CLASS
        MINSCALE 5034193
        MAXSCALE 10068389
        Name 'Parima Survey Households'
        SYMBOL 'triangle'
        SIZE 11
        COLOR 255 0 0
        OUTLINECOLOR 0 0 0
     END  # CLASS

      CLASS
        MINSCALE 0
        MAXSCALE 5034192
        Name 'Parima Survey Households'
        SYMBOL 'triangle'
        SIZE 15
        COLOR 255 0 0
        OUTLINECOLOR 0 0 0
     END  # CLASS

END  # LAYER

Martin, Daniel wrote:


Could you provide the map file definition for the Parima Survey Households
layer?
 
Thanks,
Dan

-----Original Message-----
From: Mike Smith [  <mailto:nospam@cnrit.tamu.edu>
mailto:nospam@cnrit.tamu.edu ]
Sent: Tuesday, October 01, 2002 11:56 AM
To: Martin, Daniel
Cc:  <mailto:mapserver-users@lists.gis.umn.edu>
mapserver-users@lists.gis.umn.edu 
Subject: Re: [mapserver-users] HTML Legend with Status Checking...


Same thing.  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.  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:

http://cnrit.tamu.edu/maps/map_init.html
<http://cnrit.tamu.edu/maps/map_init.html>  

Click on the very last button on that page (the one that says "FRAMES
VERSION" on it).  When the map shows up, expand the "Regional" folder on the
left-hand side to display those layers.  The one that I'm working on right
now is called "Parima Survey Households".  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.  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.

Thanks again!

Martin, Daniel wrote:


Try this.  Take out the leg_group_html section, and the leg_layer_html
section, leaving only the leg_class_html section.  Take them out entirely -
don't leave an empty set of tags.  Then, let me know what happens.
 
-Dan

-----Original Message-----
From: Mike Smith [  <mailto:nospam@cnrit.tamu.edu>
mailto:nospam@cnrit.tamu.edu ]
Sent: Tuesday, October 01, 2002 11:33 AM
To: Martin, Daniel
Cc:  <mailto:mapserver-users@lists.gis.umn.edu>
mapserver-users@lists.gis.umn.edu 
Subject: Re: [mapserver-users] HTML Legend with Status Checking...


Gladly.  Here is my legend code:

[leg_group_html]
  <tr>
        <td colspan=3 bgcolor=#cccccc><b>[leg_group_name]</b></td>
  </tr>
[/leg_group_html]

[leg_layer_html]
[/leg_layer_html]

[leg_class_html]
  <tr>
        <td width=15>&nbsp;</td>
        <td>
          <img src="[leg_icon width=15 height=15]" width=15 height=15>
        </td>
        <td>
          [leg_class_name]
        </td>
  </tr>
[/leg_class_html]


However, it does not work as you say (and as the documentation on the web
page says!).  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.  For example, I have a layer called
Ethiopia_Rivers...here's what it looks like:

LAYER
  NAME "Ethiopia_Rivers"
  TYPE LINE
  STATUS off
  GROUP Ethiopia
  DATA "ethiopia_rivers"
  HEADER 'ethiopia_rivers.shp_header.html'
      CLASS
        MAXSCALE 8710165
        Name 'Ethiopia Rivers'
        COLOR 102 204 255
        TEMPLATE ethiopia_rivers.shp_query.html
     END  # CLASS
END  # LAYER

Now, when I'm viewing my map at full extent, my scale factor is 1: 20136789,
therefore if I click on the Ethiopia_Rivers layer at that zoom level,
nothing shows up in the map.  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.  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!  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.  Grrrr!!!  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.

Thanks!

Martin, Daniel wrote:


Perhaps I misunderstood.  By default (no opt_flag set) layers that are out
of scale and layers that have a STATUS off will not show in an HTML legend.


A legend exactly like this should do exactly what it sounds like you want:

[leg_class_html]
<TR>
  <TD>
   <img src="[leg_icon]" border=0>
  </TD>
  <TD>	 
    <font face="arial" size=2>[leg_class_name]</font>
  </TD>
</TR>
[/leg_class_html]

I'm not sure why you are having trouble getting the default action.  Perhaps
you could provide your current legend.

-Dan

-----Original Message-----
From: Mike Smith [ mailto:nospam@cnrit.tamu.edu
<mailto:nospam@cnrit.tamu.edu> ]
Sent: Tuesday, October 01, 2002 10:59 AM
To: Martin, Daniel
Cc:  mapserver-! <mailto:mapserver-users@lists.gis.umn.edu> 


user!

s@li!

sts.gis.u
mn.edu
Subject: Re: [mapserver-users] HTML Legend with Status Checking...


Thank you, but this didn't change a thing.  Actually, let me correct 
that...it had a negative effect because now all my layers show up too, 
even if they are not displayed in the map.  I want only active layers to 
show in the legend and I want only IN-SCALE class symbols to show up in 
the legend, I don't want 4 symbols to show up in the legend for every 
layer that I have which has scale-specific classes...I just don't guess 
I can do that without converting everything over to Mapscript.  X-(

Any other ideas?

Martin, Daniel wrote:


You probably want a bit mask of 2 in your opt_flag.  Layers with STATUS off
still show, but layers out of scale don't show.  

[leg_layer_html opt_flag=2]


Per  http://mapserver.gis.umn.edu/doc36/html-legend-howto.html
<http://mapserver.gis.umn.edu/doc36/html-legend-howto.html>  :

1: If set, show layer even if out of scale (default: hide layers out of
scale). 

2: If set, show layer even if status is OFF (default: hide layers with
STATUS OFF). 

4: If set, show layer even if type is QUERY (default: hide layers of TYPE
QUERY) 

8: If set, show layer even if type is ANNOTATION (default: hide layers of
TYPE ANNOTATION) 


In my experience, opt_flag=2 is the most intuitive.

-Dan



-----Original Message-----
From: Mike Smith [ mailto:nospam@cn! <mailto:nospam@cnrit.tamu.edu> 
rit.!
tam

u!
.ed
u]
Sent: Mo
nday, September 30, 2002 5:06 PM
To:  mapserver-users@lists.gis.umn.edu
<mailto:mapserver-users@lists.gis.umn.edu> 
Subject: [mapserver-users] HTML Legend with Status Checking...


Hello,

   I've seen how you can make legends using PHP Mapscript that check to 
see whether a layer or class is in scale before displaying it in the 
legend, but no mention of how to do this if I'm not using Mapscript.  I 
have sub-classed many of my layers so that symbols show up in different 
sizes depending on how far zoomed in you are.  In other words, I'm using 
"MINSCALE" and "MAXSCALE" in my classes, but all of my classes show up 
in the legend and that's really annoying!  I want ONLY the in-scale 
symbol to show up in the legend as it does in the map...any tips on how 
to do this without Mapscript?  I see the "if" conditional statements in 
the HTML Legend How-to, b

ut!
 there
's no status o
f "SCALE" to 
check with 
those statements... if I could put an if statement in my legend template 
that checked whether or not a class or layer was in scale, then I'd be 
in business...any way to do this?

Thanks!












------_=_NextPart_001_01C2698C.A112F964
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 5.50.4613.1700" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D205014620-01102002>To be=20
honest, I have very little experience&nbsp;with scaleable symbols...I =
just know=20
MapServer has support for them.&nbsp; In the documentation,&nbsp;<A=20
href=3D"http://mapserver.gis.umn.edu/doc36/mapfile-reference.html">http:=
//mapserver.gis.umn.edu/doc36/mapfile-reference.html</A>&nbsp;see:</SPAN=
></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D205014620-01102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D205014620-01102002>SYMBOLSCALE under the&nbsp;LAYER=20
object</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D205014620-01102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D205014620-01102002>MINSCALE, MAXSCALE under the CLASS=20
object</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D205014620-01102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN =
class=3D205014620-01102002>Others=20
can spread more light on scaleable symbols than I can, I'm=20
sure.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D205014620-01102002></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial color=3D#0000ff size=3D2><SPAN=20
class=3D205014620-01102002>-Dan</SPAN></FONT></DIV>
<BLOCKQUOTE>
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Mike Smith=20
  [mailto:nospam@cnrit.tamu.edu]<BR><B>Sent:</B> Tuesday, October 01, =
2002 3:40=20
  PM<BR><B>To:</B> Martin, Daniel<BR><B>Cc:</B>=20
  mapserver-users@lists.gis.umn.edu<BR><B>Subject:</B> Re: =
[mapserver-users]=20
  HTML Legend with Status Checking...<BR><BR></FONT></DIV>OK, I'll buy =
that.=20
  &nbsp;I'm disappointed to hear that, though, because my .map file is =
3400=20
  lines long and I've got 4 versions of it to alter each time I make a =
change=20
  because I provide users a java-applet based version of the page and a =

  non-applet version, as well as large and small map variations...OUCH! =

  &nbsp;This is going to be very tedious to implement, but I guess =
that's what I=20
  get paid for! &nbsp;:-) <BR><BR>About the scaleable symbols...I'm not =
using=20
  them because I don't know what they are? &nbsp;I've got a symbols.sym =
file=20
  defined (that I took from the maplab tar archive) and it's got a =
bunch of=20
  symbols defined in it and I scale them with the "SIZE" keyword in my =
map=20
  file...is there something else I could do? &nbsp;What exactly is a =
"scaleable=20
  symbol"?<BR><BR>Thanks very much for your help!<BR><BR>Martin, Daniel =

  wrote:<BR>
  <BLOCKQUOTE=20
  =
cite=3D"mid:4ACBA1414DD9EE418CC250E4AAA9035A192B35@STL-EXBE-I03.corp.era=
c.com"=20
  type=3D"cite">
    <META content=3D"MSHTML 5.50.4613.1700" name=3DGENERATOR>
    <DIV><SPAN class=3D859301620-01102002><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2>It's all clear now.&nbsp; Sorry for the=20
    misunderstanding.</FONT></SPAN></DIV>
    <DIV><SPAN class=3D859301620-01102002></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D859301620-01102002><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2>AFAIK, classes&nbsp;don't have a&nbsp;status you can =
access in the=20
    HTML&nbsp;legend&nbsp;like layers (unfortunately).&nbsp; What I =
know will=20
    work (because I do it all the time) is creating 4 separate layers =
each with=20
    1 and only 1 class and moving your MINSCALE and MAXSCALE settings =
to the=20
    layer object.&nbsp;&nbsp;Give all the layers the same name (very=20
    important).&nbsp; </FONT></SPAN></DIV>
    <DIV><SPAN class=3D859301620-01102002></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D859301620-01102002><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2>This will perform exactly the same since you have no =
crossover of=20
    scale, and the HTML legend will perform as you expect it to.&nbsp;=20
    </FONT></SPAN></DIV>
    <DIV><SPAN class=3D859301620-01102002></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D859301620-01102002></SPAN><SPAN=20
    class=3D859301620-01102002><FONT face=3DArial color=3D#0000ff =
size=3D2>On a separate=20
    subject, you&nbsp;might be better off using scaleable symbols =
rather than=20
    your current solution.&nbsp; But, perhaps you have reasons for not =
using=20
    them.</FONT></SPAN></DIV>
    <DIV><SPAN class=3D859301620-01102002></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D859301620-01102002><FONT face=3DArial =
color=3D#0000ff=20
    size=3D2>-Dan</FONT></SPAN></DIV>
    <DIV>&nbsp;</DIV>
    <DIV><FONT face=3DTahoma><FONT size=3D2><SPAN=20
    class=3D859301620-01102002>&nbsp;</SPAN>-----Original=20
    Message-----<BR><B>From:</B> Mike Smith [<A =
class=3Dmoz-txt-link-freetext=20
    =
href=3D"mailto:nospam@cnrit.tamu.edu">mailto:nospam@cnrit.tamu.edu</A>]<=
BR><B>Sent:</B>=20
    Tuesday, October 01, 2002 2:43 PM<BR><B>To:</B> Martin, =
Daniel<BR><B>Cc:</B>=20
    <A class=3Dmoz-txt-link-abbreviated=20
    =
href=3D"mailto:mapserver-users@lists.gis.umn.edu">mapserver-users@lists.=
gis.umn.edu</A><BR><B>Subject:</B>=20
    Re: [mapserver-users] HTML Legend with Status=20
    Checking...<BR><BR></FONT></FONT></DIV>
    <BLOCKQUOTE>LAYER<BR>&nbsp; NAME Parima_Surveyhouseholds<BR>&nbsp; =
GROUP=20
      Region<BR>&nbsp; TYPE Point<BR>&nbsp; STATUS off<BR>&nbsp; DATA=20
      parima_surveyhouseholds<BR>&nbsp; HEADER=20
      'parima_surveyhouseholds.shp_header.html'<BR>&nbsp; TEMPLATE=20
      =
parima_surveyhouseholds.shp_query.html<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&n=
bsp;=20
      CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINSCALE=20
      20136780<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name =
'Parima Survey=20
      Households'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL=20
      'triangle'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE=20
      5<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 255 0=20
      0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0=20
      0<BR>&nbsp;&nbsp;&nbsp;&nbsp; END&nbsp; #=20
      CLASS<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
      CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINSCALE=20
      10068390<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MAXSCALE=20
      20136779<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name =
'Parima Survey=20
      Households'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL=20
      'triangle'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE=20
      8<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 255 0=20
      0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0=20
      0<BR>&nbsp;&nbsp;&nbsp;&nbsp; END&nbsp; #=20
      CLASS<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
      CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINSCALE=20
      5034193<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MAXSCALE=20
      10068389<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name =
'Parima Survey=20
      Households'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL=20
      'triangle'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE=20
      11<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 255 0=20
      0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0=20
      0<BR>&nbsp;&nbsp;&nbsp;&nbsp; END&nbsp; #=20
      CLASS<BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
      CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINSCALE=20
      0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MAXSCALE=20
      5034192<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name =
'Parima Survey=20
      Households'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL=20
      'triangle'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE=20
      15<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 255 0=20
      0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 0 0=20
      0<BR>&nbsp;&nbsp;&nbsp;&nbsp; END&nbsp; # CLASS<BR><BR>END&nbsp; =
#=20
      LAYER<BR><BR>Martin, Daniel wrote:<BR>
      <BLOCKQUOTE=20
      =
cite=3D"mid:4ACBA1414DD9EE418CC250E4AAA9035A192B34@STL-EXBE-I03.corp.era=
c.com"=20
      type=3D"cite">
        <META content=3D"MSHTML 5.50.4613.1700" name=3DGENERATOR>
        <DIV><SPAN class=3D692135717-01102002><FONT face=3DArial =
color=3D#0000ff=20
        size=3D2>Could you provide the map file definition for the =
Parima Survey=20
        Households layer?</FONT></SPAN></DIV>
        <DIV><SPAN class=3D692135717-01102002></SPAN>&nbsp;</DIV>
        <DIV><SPAN class=3D692135717-01102002><FONT face=3DArial =
color=3D#0000ff=20
        size=3D2>Thanks,</FONT></SPAN></DIV>
        <DIV><SPAN class=3D692135717-01102002><FONT face=3DArial =
color=3D#0000ff=20
        size=3D2>Dan</FONT></SPAN></DIV>
        <BLOCKQUOTE>
          <DIV class=3DOutlookMessageHeader dir=3Dltr =
align=3Dleft><FONT face=3DTahoma=20
          size=3D2>-----Original Message-----<BR><B>From:</B> Mike =
Smith [<A=20
          class=3Dmoz-txt-link-freetext =
href=3D"mailto:nospam@cnrit.tamu.edu">=20
          mailto:nospam@cnrit.tamu.edu</A> ]<BR><B>Sent:</B> Tuesday, =
October=20
          01, 2002 11:56 AM<BR><B>To:</B> Martin, =
Daniel<BR><B>Cc:</B><A=20
          class=3Dmoz-txt-link-abbreviated=20
          href=3D"mailto:mapserver-users@lists.gis.umn.edu">=20
          mapserver-users@lists.gis.umn.edu</A> <BR><B>Subject:</B> Re: =

          [mapserver-users] HTML Legend with Status=20
          Checking...<BR><BR></FONT></DIV>Same thing. &nbsp;Now I don't =
have=20
          group header bars seperating my layers, but all the layers =
still show=20
          up and when I click on a layer that has scale-specific =
classes, the=20
          symbols for all scales still show up. &nbsp;By the way, I'm =
on=20
          Mapserver 3.6.1 and here's the page to go to if you want to =
see what=20
          I'm talking about:<BR><BR><A class=3Dmoz-txt-link-freetext=20
          =
href=3D"http://cnrit.tamu.edu/maps/map_init.html">http://cnrit.tamu.edu/=
maps/map_init.html</A>=20
          <BR><BR>Click on the very last button on that page (the one =
that says=20
          "FRAMES VERSION" on it). &nbsp;When the map shows up, expand =
the=20
          "Regional" folder on the left-hand side to display those =
layers.=20
          &nbsp;The one that I'm working on right now is called "Parima =
Survey=20
          Households". &nbsp;Click on that layer to load it into the =
map, then=20
          you'll see the various symbols I'm referring to show up in =
the legend.=20
          &nbsp;I represent the Parima households with red triangle =
symbols and=20
          I have different sized triangles depending on how far zoomed =
in you=20
          are so that they are small at a high scale and larger as you =
zoom=20
          in...but I don't want all versions of that symbol to show up =
in my=20
          legend all the time...just the one that's in =
scale.<BR><BR>Thanks=20
          again!<BR><BR>Martin, Daniel wrote:<BR>
          <BLOCKQUOTE=20
          =
cite=3D"mid:4ACBA1414DD9EE418CC250E4AAA9035A16F347@STL-EXBE-I03.corp.era=
c.com"=20
          type=3D"cite">
            <META content=3D"MSHTML 5.50.4613.1700" name=3DGENERATOR>
            <DIV><SPAN class=3D328113416-01102002><FONT face=3DArial =
color=3D#0000ff=20
            size=3D2>Try this.&nbsp; Take out the leg_group_html =
section, and the=20
            leg_layer_html section, leaving only the leg_class_html=20
            section.&nbsp; Take them out entirely - don't leave an =
empty set of=20
            tags.&nbsp; Then, let me know what =
happens.</FONT></SPAN></DIV>
            <DIV><SPAN class=3D328113416-01102002></SPAN>&nbsp;</DIV>
            <DIV><SPAN class=3D328113416-01102002><FONT face=3DArial =
color=3D#0000ff=20
            size=3D2>-Dan</FONT></SPAN></DIV>
            <BLOCKQUOTE>
              <DIV class=3DOutlookMessageHeader dir=3Dltr =
align=3Dleft><FONT=20
              face=3DTahoma size=3D2>-----Original =
Message-----<BR><B>From:</B> Mike=20
              Smith [<A class=3Dmoz-txt-link-freetext=20
              href=3D"mailto:nospam@cnrit.tamu.edu">=20
              mailto:nospam@cnrit.tamu.edu</A> ]<BR><B>Sent:</B> =
Tuesday,=20
              October 01, 2002 11:33 AM<BR><B>To:</B> Martin,=20
              Daniel<BR><B>Cc:</B><A class=3Dmoz-txt-link-abbreviated=20
              href=3D"mailto:mapserver-users@lists.gis.umn.edu">=20
              mapserver-users@lists.gis.umn.edu</A> <BR><B>Subject:</B> =
Re:=20
              [mapserver-users] HTML Legend with Status=20
              Checking...<BR><BR></FONT></DIV>Gladly. &nbsp;Here is my =
legend=20
              code:<BR><BR>[leg_group_html]<BR>&nbsp;=20
              &lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;td=20
              colspan=3D3=20
              =
bgcolor=3D#cccccc&gt;&lt;b&gt;[leg_group_name]&lt;/b&gt;&lt;/td&gt;<BR>&=
nbsp;=20
              =
&lt;/tr&gt;<BR>[/leg_group_html]<BR><BR>[leg_layer_html]<BR>[/leg_layer_=
html]<BR><BR>[leg_class_html]<BR>&nbsp;=20
              &lt;tr&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
&lt;td=20
              =
width=3D15&gt;&amp;nbsp;&lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;=20
              =
&lt;td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
              &lt;img src=3D"[leg_icon width=3D15 height=3D15]" =
width=3D15=20
              =
height=3D15&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
              &lt;/td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =

              =
&lt;td&gt;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
              =
[leg_class_name]<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
              &lt;/td&gt;<BR>&nbsp;=20
              &lt;/tr&gt;<BR>[/leg_class_html]<BR><BR><BR>However, it =
does not=20
              work as you say (and as the documentation on the web page =
says!).=20
              &nbsp;Layers that are "off" do not show up (that's as =
expected and=20
              what I want), that's fine, but layers that are out of =
SCALE DO=20
              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=20
              example, I have a layer called Ethiopia_Rivers...here's =
what it=20
              looks like:<BR><BR>LAYER<BR>&nbsp; NAME=20
              "Ethiopia_Rivers"<BR>&nbsp; TYPE LINE<BR>&nbsp; STATUS=20
              off<BR>&nbsp; GROUP Ethiopia<BR>&nbsp; DATA=20
              "ethiopia_rivers"<BR>&nbsp; HEADER=20
              =
'ethiopia_rivers.shp_header.html'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
              CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
MAXSCALE=20
              8710165<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
Name=20
              'Ethiopia =
Rivers'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
              COLOR 102 204 255<BR>&nbsp; &nbsp; &nbsp; &nbsp; TEMPLATE =

              =
ethiopia_rivers.shp_query.html<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
              END&nbsp; # CLASS<BR>END&nbsp; # LAYER<BR><BR>Now, when =
I'm=20
              viewing my map at full extent, my scale factor is 1:<FONT =

              size=3D3><B> 20136789</B></FONT>, therefore if I click on =
the=20
              Ethiopia_Rivers layer at that zoom level, nothing shows =
up in the=20
              map. &nbsp;This is the exact behavior that I would =
expect...I'm=20
              out of scale for that layer, so it doesn't show up in the =
map=20
              until I zoom in. &nbsp;The PROBLEM, however, is that the =
"Ethiopia=20
              Rivers" icon and label pop up in my legend...this is=20
              counter-intuitive, contrary to the documented behavior of =

              Mapserver, and just flat-out frustrating! &nbsp;If the =
layer is=20
              not showing up in my map (because it's out of scale), =
then it=20
              should NOT be in my legend either. &nbsp;Grrrr!!! =
&nbsp;Pardon me=20
              for sounding bitter...I'm not lashing out at you, I'm =
very=20
              grateful for your help, I'm just frustrated at=20
              Mapserver.<BR><BR>Thanks!<BR><BR>Martin, Daniel =
wrote:<BR>
              <BLOCKQUOTE=20
              cite=3D"mid:4ACBA1414DD9EE418CC250E4AAA9035A192B33@STL-EXB=
E-I03.corp.erac.com"=20
              type=3D"cite"><PRE wrap=3D"">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=3D"[leg_icon]" border=3D0&gt;<BR>  &lt;/TD&gt;<BR>  =
&lt;TD&gt;	 <BR>    &lt;font face=3D"arial" =
size=3D2&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=3Dmoz-txt-link-freetext =
href=3D"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=3Dmoz-txt-link-abbreviated =
href=3D"mailto:mapserver-users@lists.gis.umn.edu">mapserver-!<BR>
user!<BR><BR>s@li!<BR><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=3D"cite"><PRE wrap=3D"">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=3D2]<BR><BR><BR>Per <A class=3Dmoz-txt-link-freetext =
href=3D"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=3D2 is the most =
intuitive.<BR><BR>-Dan<BR><BR><BR><BR>-----Original =
Message-----<BR>From: Mike Smith [<A class=3Dmoz-txt-link-freetext =
href=3D"mailto:nospam@cnrit.tamu.edu">mailto:nospam@cn!<BR>rit.!<BR>tam
u!<BR>.ed<BR>u</A>]<BR>Sent: Mo<BR>nday, September 30, 2002 5:06 =
PM<BR>To: <A class=3Dmoz-txt-link-abbreviated =
href=3D"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, b
ut!<BR> there<BR>'s no status o<BR>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=3D""><!----><BR><BR><BR></PRE></BLOCKQUOTE><BR></BLOCKQUOTE></BLOCK=
QUOTE><BR></BLOCKQUOTE></BLOCKQUOTE><BR></BLOCKQUOTE></BLOCKQUOTE><BR></=
BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C2698C.A112F964--

------=_NextPartTM-000-f8c91402-d57b-11d6-bb09-00508bcfdcc7--