[Mapserver-users] Show/hide labels with LABELMINSCALE & LABELMAXSCALE

Steve McCrone mccrone at pc.jaring.my
Fri Jan 10 06:25:26 EST 2003


This is a multi-part message in MIME format.

------=_NextPart_000_0009_01C2B8DE.07350180
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I wish to only show the road labels when the map reaches a =
pre-determiend scale.I've searched the archives and still baffled.

I realize that this should be a straight forward task, but it has =
defeated me (new to this subject). I load the same
shp files into ArcView and get an idea of when I wish to show/hide the =
labels by playing around with the minumun and maximum
scale values (withn theme->properties dialog). However, nothing seems to =
work on my mapserver. I'm not using php, just wish to set
it up in the map file.

I had originally had the labelling as part of the layer and then created =
a separate annotation layer - still did'nt work.

I'll give you my single layer and see if anyone can assist me on =
showing/hiding the labels for the roads -=20

LAYER
  NAME "roads"
  STATUS OFF
  DATA ROAD_GPS
  LABELITEM "Road_name" =20
  #LABELMINSCALE ????---> Can't figure out what values to set
  #LABELMINSCALE ????---> Can't figure out what values to set
  TYPE LINE
  CLASS
    COLOR 0 0 255
    LABEL
        TYPE TRUETYPE
         #ANTIALIAS
 FONT arial
        COLOR 0 0 0
 OUTLINECOLOR 220 220 220
 SIZE 8
 #SIZE MEDIUM
 ANGLE AUTO
 POSITION UC
 OFFSET 0 2      =20
 buffer 2
    END#label
  END
END # roads


------=_NextPart_000_0009_01C2B8DE.07350180
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=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I wish to only show the road labels =
when the map=20
reaches a pre-determiend scale.I've searched the archives and still=20
baffled.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I realize that this should be a =
straight forward=20
task, but it has defeated me (new to this subject). I load the =
same<BR>shp files=20
into ArcView and get an idea of when I wish to show/hide the labels by =
playing=20
around with the minumun and maximum<BR>scale values (withn =
theme-&gt;properties=20
dialog). However, nothing seems to work on my mapserver. I'm not using =
php, just=20
wish to set<BR>it up in the map file.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I had originally had the labelling as =
part of the=20
layer and then created a separate annotation layer - still did'nt=20
work.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I'll give you my single layer and see =
if anyone can=20
assist me on showing/hiding the labels for the roads - </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp; NAME "roads"<BR>&nbsp; =
STATUS=20
OFF<BR>&nbsp; DATA ROAD_GPS<BR>&nbsp; LABELITEM "Road_name"&nbsp; =
<BR>&nbsp;=20
#LABELMINSCALE ????---&gt; Can't figure out what values to set<BR>&nbsp; =

#LABELMINSCALE ????---&gt; Can't figure out what values to set<BR>&nbsp; =
TYPE=20
LINE<BR>&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp; COLOR 0 0 =
255<BR>&nbsp;&nbsp;&nbsp;=20
LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE=20
TRUETYPE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
#ANTIALIAS<BR>&nbsp;FONT =
arial<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
COLOR 0 0 0<BR>&nbsp;OUTLINECOLOR 220 220 220<BR>&nbsp;SIZE =
8<BR>&nbsp;#SIZE=20
MEDIUM<BR>&nbsp;ANGLE AUTO<BR>&nbsp;POSITION UC<BR>&nbsp;OFFSET 0=20
2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <BR>&nbsp;buffer =
2<BR>&nbsp;&nbsp;&nbsp;=20
END#label<BR>&nbsp; END<BR>END # roads<BR></FONT></DIV></BODY></HTML>

------=_NextPart_000_0009_01C2B8DE.07350180--





More information about the mapserver-users mailing list