[Mapserver-users] Section 3 - Example 2 of MS 3.5 Tutorial

McNeil, Todd W. TMCNEIL TMCNEIL at arinc.com
Wed Oct 8 14:25:07 EDT 2003


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.

------_=_NextPart_000_01C38DC9.80199910
Content-Type: text/plain

Hi fellow MS'ers,

I'm trying the tutorial for MS 3.5 and it's a great way to start learning
MapServer.  I can see that labeling is and will always be a major concern to
folks that use this.  So far, I've made it up to Section 3, but have found
my way into something that I can't figure out.  This is what my page is
supposed to look like according to the tutorial web-site.

http://terrasip.gis.umn.edu/cgi-bin/mapserv35?map=/data/projects/tutorial35/
s3/s3ex2.map
<http://terrasip.gis.umn.edu/cgi-bin/mapserv35?map=/data/projects/tutorial35
/s3/s3ex2.map> 

However, I am not getting all three images that you see here.  My html page
comes up blank without the map image, legend image and the overview image.
I can assume that it's a problem in my map file and that I am not using the
correct temporary directory to where these images are being created.  I
think my html file is ok, but I'll attach it to the bottom as well as the
map file. Does anybody know where IIS temporarily stores the gif images so
that I can put the correct directory paths into the template file?
(IMAGEPATH and IMAGEURL).

Thanks in advance.

 <<s3ex2.map>> 
 <<s3ex2.html>> 
Thanks in advance,
********************************** 
Todd McNeil
ARINC
Annapolis, MD
Tel: 410.266.2302 Email: tmcneil at arinc.com 
Fax: 410.573.3170 Web: http://www.arinc.com <http://www.arinc.com> 


------_=_NextPart_000_01C38DC9.80199910
Content-Type: application/octet-stream;
	name="s3ex2.map"
Content-Disposition: attachment;
	filename="s3ex2.map"

NAME S3EX2
EXTENT -97.5 41.619778 -82.122902 49.38562
SIZE 400 300
SHAPEPATH "E:\Projects\tutorial35\data"
FONTSET "E:\Projects\tutorial35\data\fonts.list"
SYMBOLSET "E:\Projects\tutorial35\symbols\symbols35.sym"

WEB
  TEMPLATE s3ex2.html
  IMAGEPATH "data\tmp\"
  IMAGEURL "tmp\"
END

LEGEND
  STATUS ON
  LABEL
    TYPE TRUETYPE
    FONT arial
    COLOR 0 0 0
    SIZE 12
    ANTIALIAS TRUE
  END
END

REFERENCE
  STATUS ON
  IMAGE "..\images\ref1.gif"
  SIZE 150 113
  EXTENT -97.5 41.619778 -82.122902 49.38562
  COLOR -1 -1 -1
  OUTLINECOLOR 255 0 0
END


# LAYER DEFINITIONS ---------------------------------------------
LAYER # Shaded Relief Raster
  NAME "relief"
  DATA "raster\shdrlfi020g_ugl.tif"
  STATUS DEFAULT
  TYPE RASTER
#  OFFSITE 0
END

LAYER # States
  NAME "states"
  DATA states_ugl
  STATUS OFF
  TYPE POLYGON

# CLASSITEM "CLASS"
  CLASS # States class
    NAME "States"
    EXPRESSION ('[CLASS]' eq 'land')
#   EXPRESSION 'land'
    COLOR 240 240 240
    OUTLINECOLOR 0 0 0
  END # end of States class object
END # end of layer object

LAYER # water features layer
  NAME "water features"
  DATA hydrop_ugl
  STATUS DEFAULT
  TYPE POLYGON

  CLASSITEM "FEATURE"
  CLASS
    NAME "Bay/Estuarine"
    EXPRESSION /Bay*/
    COLOR 164 164 255
  END
  CLASS
    NAME "Lakes/Reservoir"
    EXPRESSION ('[FEATURE]' eq 'Lake' or '[FEATURE]' = 'Reservoir')
    COLOR 64 64 255
  END
  CLASS
    NAME "Marsh/Swamp"
    EXPRESSION /Sw*/
    COLOR 210 235 255
  END
  CLASS
    NAME "Major Rivers"
    EXPRESSION 'Stream'
    COLOR 128 128 220
  END
  CLASS
    NAME "Canal"
    EXPRESSION 'Canal'
    COLOR 200 128 255
  END
END  # end of water features layer

#LAYER # Roads
#  NAME "roads"
#  DATA roads_ugl
#  TYPE LINE
#  STATUS DEFAULT
#
#  CLASSITEM "CLASS"
#  CLASS
#    NAME "Interstate Highways"
#    EXPRESSION 'Interstate'
#    COLOR 128 0 0
#    SYMBOL 'circle'
#    SIZE 2
#  END
#  CLASS
#    NAME "US Highways"
#    EXPRESSION 'US'
#    COLOR 255 128 0
#    SYMBOL 'line1'
#    SIZE 1
#  END
#END

LAYER # States
  NAME "states"
  DATA states_ugl
  STATUS DEFAULT
  TYPE LINE

# CLASSITEM "CLASS"
  CLASS # States class
    NAME "States"
    EXPRESSION ('[CLASS]' eq 'land')
#   EXPRESSION 'land'
    COLOR 0 0 0
  END # end of States class object
END # end of layer object

LAYER # States
  NAME "states"
  DATA states_ugl
  STATUS DEFAULT
  TYPE ANNOTATION

  LABELITEM "STATE"
  CLASSITEM "CLASS"
  CLASS # States class
    EXPRESSION 'land'
    COLOR -1 -1 -1
    LABEL
      COLOR 132 31 31
      SHADOWCOLOR 218 218 218
      SHADOWSIZE 2 2
      TYPE TRUETYPE
      FONT arial-bold
      SIZE 14
      ANTIALIAS TRUE
      POSITION CL
      PARTIALS FALSE
      MINDISTANCE 250
      BUFFER 4
    END # end of label
  END # end of States class object
END # end of layer object

END # end of map file


------_=_NextPart_000_01C38DC9.80199910
Content-Type: text/html;
	name="s3ex2.html"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="s3ex2.html"

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
  <head>
    <title>MapServer 3.5 Tutorial</title>
	<link type=3D"text/css" rel=3D"stylesheet" =
href=3D"/projects/tutorial35/ms35.css" />
  </head>

  <body>
<h3>Section 3<br>
  Example 2 &#150; Zoom Controls</h3>
<p>

    <form method=3D"GET" action=3D"/Scripts/mapserv.exe">

    <input type=3D"hidden" name=3D"map" value=3D"[map]">
    <input type=3D"hidden" name=3D"imgext" value=3D"[mapext]">

    [<a href=3D"E:/projects/tutorial35/s3/s3ex2_map.html">map file =
listing</a>]
    [<a href=3D"E:/projects/tutorial35/s3/s3ex2_code.html">template =
file listing</a>]
    <table border=3D1 cellpadding=3D3>
    <tr>
    <td align=3Dcenter>
      <input type=3D"image" name=3D"img" src=3D"[img]" border=3D"0">
    </td>
    <td valign=3Dtop>
      <font size=3D+1 face=3Darial,helvetica>Map Controls</font>
      <p>
      Set your zoom option:<br>
      <select name=3D"zoom" size=3D"1">
      <option value=3D"10" [zoom_10_select]> Zoom in 10 times
      <option value=3D"8" [zoom_8_select]> Zoom in 8 times
      <option value=3D"4" [zoom_4_select]> Zoom in 4 times
      <option value=3D"3" [zoom_3_select]> Zoom in 3 times
      <option value=3D"2" [zoom_2_select]> Zoom in 2 times
      <option value=3D"1"  [zoom_1_select]> Recenter Map
      <option value=3D"-2" [zoom_-2_select]> Zoom out 2 times
      <option value=3D"-3" [zoom_-3_select]> Zoom out 3 times
      <option value=3D"-4" [zoom_-4_select]> Zoom out 4 times
      <option value=3D"-8" [zoom_-8_select]> Zoom out 8 times
      <option value=3D"-10" [zoom_-10_select]> Zoom out 10 times
      </select>
      <p>
      <font face=3Darial,helvetica><b>Legend</b></font><br>
      <img src=3D"[legend]"><p>
      <img src=3D"[ref]">
    </td>
    </tr></table>
   =20
  <p> <a href=3D"index.html">Back to Section 3</a> | <a =
href=3D"/Scripts/mapserv.exe?map=3DE:/Projects/tutorial35/s3/s3ex2.map&l=
ayer=3Dwater&layer=3Dstates&zoom=3D1&submit=3DRedraw">Proceed=20
    to Example 3</a>=20
</form>

  </body>
</html>



------_=_NextPart_000_01C38DC9.80199910--



More information about the mapserver-users mailing list