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

Steve McCrone mccrone at pc.jaring.my
Fri Jan 10 03:25:26 PST 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> </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->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> </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> </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> </DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>  NAME "roads"<BR>  =
STATUS=20
OFF<BR>  DATA ROAD_GPS<BR>  LABELITEM "Road_name"  =
<BR> =20
#LABELMINSCALE ????---> Can't figure out what values to set<BR>  =

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

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





More information about the MapServer-users mailing list