<div>I&#39;m a newman in Mapserver. i want to use mapserver to distribute some products in my office such as shape file, modis geotiff,and so on. i study the tutorial create by Created by Pericles S. Nacionales . i think i grasp the idea in section one ,that mean i learn how to write my own mapfile. but i fail in section 2, when i try to imply mapfile into website. i don&#39;t understand how&nbsp; to manage template file. 
</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div>here is my mapfile</div>
<div>&nbsp;</div>
<div>
<p># The annotated map file (sort of)<br># Created by Pericles S. Nacionales for the MapServer tutorial<br># 20050408<br>#<br># MapServer map file uses the pound sign (#) to denote the start of a line<br># comment--each line that needs to be commented has to be prepended with a &quot;#&quot;.
<br>#<br># Map files begin with MAP keyword to signify the start of the map object.<br># Well, the entire map file is THE map object.&nbsp; Enclosed between MAP and END<br># at the very bottom of this map file, are keyword/value pairs and other
<br># objects.<br>MAP<br>&nbsp; IMAGETYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PNG<br>&nbsp; EXTENT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 116.701621 38.555172 118.057785 40.251619<br>&nbsp; SIZE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 800 600<br>&nbsp; SHAPEPATH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;../data&quot;<br>&nbsp; IMAGECOLOR&nbsp;&nbsp;&nbsp;&nbsp; 255 255 255<br>&nbsp; FONTSET&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;../fonts/fonts.list&quot;
</p>
<p>&nbsp; # Layer objects are defined beneath the map object.&nbsp; You need at least one<br>&nbsp; # layer defined in your map file before you can display a map...&nbsp; You can<br>&nbsp; # define as many layers as you&#39;d like although a limit is typically hard-coded
<br>&nbsp; # in map.h in the MapServer source.&nbsp; The default limit is set at 100.&nbsp; You&#39;d<br>&nbsp; # have to have a very specialized application to need more than 100 layers in<br>&nbsp; # your application.</p>
<p>&nbsp; # Start of LAYER DEFINITIONS ---------------------------------------------<br>&nbsp; <br>&nbsp; <br>&nbsp; <br>&nbsp; LAYER # States polygon layer begins here<br>&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; county<br>&nbsp;&nbsp;&nbsp; DATA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; county<br>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OFF
<br>&nbsp;&nbsp;&nbsp; TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POLYGON</p>
<p>&nbsp;&nbsp;&nbsp; # CLASSITEM defines the non-spatial attribute that you will be using to<br>&nbsp;&nbsp;&nbsp; # separate a layer into classes.&nbsp; This attribute will be in the DBF file<br>&nbsp;&nbsp;&nbsp; # of your shapefile (it will be different for each data format).&nbsp; In this
<br>&nbsp;&nbsp;&nbsp; # example the shapefile states_ugl has an associated database <br>&nbsp;&nbsp;&nbsp; # (states_ugl.dbf) that contains an attribute called &quot;CLASS&quot;.&nbsp; You will be<br>&nbsp;&nbsp;&nbsp; # using two values in the CLASS attribute to separate the classes (also 
<br>&nbsp;&nbsp;&nbsp; # called themes) used in this layer--land and water.&nbsp; CLASSITEM is used in <br>&nbsp;&nbsp;&nbsp; # association with the EXPRESSION parameter in the CLASS object.&nbsp; See below.<br>&nbsp;&nbsp;&nbsp; CLASSITEM&nbsp;&nbsp;&nbsp; &quot;物非&quot;</p>
<p>&nbsp;&nbsp;&nbsp; # Just like CLASSITEM, LABELITEM defines the database attribute that you <br>&nbsp;&nbsp;&nbsp; # will be using to draw labels.&nbsp; In this case, the values of the attribute <br>&nbsp;&nbsp;&nbsp; # &quot;STATE&quot; will be used to label the states polygons.
<br>&nbsp;&nbsp;&nbsp; LABELITEM&nbsp;&nbsp;&nbsp; &quot;UNITENAME&quot;</p>
<p>&nbsp;&nbsp;&nbsp; # The class object is defined within the layer object.&nbsp; You can define as<br>&nbsp;&nbsp;&nbsp; # many classes as you need (well, there are limits as with layers, but it&#39;s<br>&nbsp;&nbsp;&nbsp; # senseless to define more than ten on a &quot;normal&quot; layer.&nbsp; There are
<br>&nbsp;&nbsp;&nbsp; # situations, however, where you might have to do it.)<br>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME &#39;VERYGOOD&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPRESSION ([物非] &gt;0.382)</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # There are styles in a class, just like there are classes in a layer,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # just like there are layers in a map.&nbsp; You can define multiple styles in<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # a class just as you can define multiple classes in a layer and multiple
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # layers in a map.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 232 121 128<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LABEL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 132 31 31<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHADOWCOLOR 218 218 218<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHADOWSIZE 2 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE TRUETYPE<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONT simhei<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 12<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANTIALIAS TRUE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION AUTO<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PARTIALS FALSE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINDISTANCE 300<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BUFFER 4<br>&nbsp;ENCODING GB2312<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END # end of label</p>
<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # There can be labels in a class, just like there are classes in a layer,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # just like there are layers in a map.&nbsp; You can define multiple labels in<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # a class just as you can define multiple classes in a layer and multiple
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # layers in a map.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # MapServer has a very flexible labeling system.&nbsp; With that flexibility<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # comes complexity, specially when using truetype fonts.&nbsp; Please read <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # through the LABEL section of the MapServer map file documentation at
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # <a href="http://ms.gis.umn.edu/docs/reference/mapfile">http://ms.gis.umn.edu/docs/reference/mapfile</a> for more information.<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME &#39;GOOD&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPRESSION ([物非]&gt;
0.289 and [物非] &lt; 0.382 )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;COLOR&nbsp;&nbsp;&nbsp; 25 123 12<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LABEL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR&nbsp; 132 31 31<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHADOWCOLOR 218 218 218<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHADOWSIZE 2 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE TRUETYPE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONT simhei
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 12<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANTIALIAS TRUE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION AUTO<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PARTIALS FALSE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINDISTANCE 300<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BUFFER 4<br>&nbsp;ENCODING GB2312<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END # end of label<br>&nbsp;&nbsp;&nbsp; END&nbsp; <br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; CLASS
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME &#39;MIDDLE&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPRESSION ([物非]&gt;0.251 and [物非] &lt; 0.289 )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;COLOR&nbsp;&nbsp;&nbsp; 255 255 21 <br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LABEL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR&nbsp; 132 31 31<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHADOWCOLOR 218 218 218<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHADOWSIZE 2 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE TRUETYPE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONT simhei<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 12<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANTIALIAS TRUE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION AUTO<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PARTIALS FALSE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINDISTANCE 300<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BUFFER 4<br>&nbsp;ENCODING GB2312
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END # end of label<br>&nbsp;&nbsp;&nbsp; END</p>
<p>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME &#39;BAD&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPRESSION ([物非]&gt;0.179 and [物非] &lt; 0.251 )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;COLOR&nbsp;&nbsp;&nbsp; 21 255 243<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LABEL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 132 31 31<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHADOWCOLOR 218 218 218
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHADOWSIZE 2 2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE TRUETYPE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONT simhei<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 12<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANTIALIAS TRUE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION AUTO<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PARTIALS FALSE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINDISTANCE 300<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BUFFER 4<br>
&nbsp;ENCODING GB2312<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END # end of label<br>&nbsp;&nbsp;&nbsp; END</p>
<p>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME &#39;VERYBAD&#39;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPRESSION ([物非]=0.178 )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;COLOR&nbsp;&nbsp;&nbsp; 255 12 243<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LABEL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 132 31 31<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHADOWCOLOR 218 218 218<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SHADOWSIZE 2 2
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE TRUETYPE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONT simhei<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 12<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANTIALIAS TRUE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION AUTO<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; PARTIALS FALSE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINDISTANCE 300<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BUFFER 4<br>&nbsp;ENCODING GB2312<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END # end of label
</p>
<p>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; END</p>
<p>&nbsp; LAYER # MODIS raster layer begins here<br>&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; tianjin_modis<br>&nbsp;&nbsp;&nbsp; DATA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;raster/tianjin.tif&quot;<br>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OFF<br>&nbsp;&nbsp;&nbsp; TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; RASTER<br>&nbsp;&nbsp;&nbsp; PROCESSING&nbsp;&nbsp; &quot;BANDS=1,2,1&quot;
<br>&nbsp;&nbsp;&nbsp; #OFFSITE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 71 74 65</p>
<p>&nbsp;&nbsp;&nbsp; #PROJECTION<br>&nbsp;&nbsp;&nbsp; #&nbsp; &quot;init=epsg:4326&quot;<br>&nbsp;&nbsp;&nbsp; #END<br>&nbsp; END # MODIS raster layer ends here&nbsp;&nbsp; </p>
<p>LAYER # RAIL LINE layer begins here<br>&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rail<br>&nbsp;&nbsp;&nbsp; DATA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rail<br>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OFF<br>&nbsp;&nbsp;&nbsp; TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LINE</p>
<p>&nbsp;&nbsp;&nbsp; # Here&#39;s an example of the input projection definition.<br>&nbsp;&nbsp;&nbsp; # EPSG:4326 is code for geographic (latlong) projection<br>&nbsp;&nbsp;&nbsp; # using the WGS84 datum.<br>&nbsp;&nbsp;&nbsp; #<br>&nbsp;&nbsp;&nbsp; # PROJECTION objects within the LAYER object define the input
<br>&nbsp;&nbsp;&nbsp; # projection--this is the native projection of your data.<br>&nbsp;&nbsp;&nbsp; PROJECTION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;init=epsg:4326&quot;<br>&nbsp;&nbsp;&nbsp; END</p>
<p>&nbsp;&nbsp;&nbsp; # CLASSITEM defines the non-spatial attribute that you will be using to<br>&nbsp;&nbsp;&nbsp; # separate a layer into classes.&nbsp; This attribute will be in the DBF file<br>&nbsp;&nbsp;&nbsp; # of your shapefile (it will be different for each data format).&nbsp; In this
<br>&nbsp;&nbsp;&nbsp; # example the shapefile states_ugl has an associated database <br>&nbsp;&nbsp;&nbsp; # (states_ugl.dbf) that contains an attribute called &quot;CLASS&quot;.&nbsp; You will be<br>&nbsp;&nbsp;&nbsp; # using two values in the CLASS attribute to separate the classes (also 
<br>&nbsp;&nbsp;&nbsp; # called themes) used in this layer--land and water.&nbsp; CLASSITEM is used in <br>&nbsp;&nbsp;&nbsp; # association with the EXPRESSION parameter in the CLASS object.&nbsp; See below.<br>&nbsp;&nbsp;&nbsp; #CLASSITEM&nbsp;&nbsp;&nbsp; &quot;CLASS&quot;</p>
<p>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL&nbsp;&nbsp;&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 232 232 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp; END # RAIL LINE&nbsp; layer ends here</p>
<p><br>LAYER # ROAD LINE layer begins here<br>&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; road<br>&nbsp;&nbsp;&nbsp; DATA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; road<br>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OFF<br>&nbsp;&nbsp;&nbsp; TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LINE</p>
<p>&nbsp;&nbsp;&nbsp; # Here&#39;s an example of the input projection definition.<br>&nbsp;&nbsp;&nbsp; # EPSG:4326 is code for geographic (latlong) projection<br>&nbsp;&nbsp;&nbsp; # using the WGS84 datum.<br>&nbsp;&nbsp;&nbsp; #<br>&nbsp;&nbsp;&nbsp; # PROJECTION objects within the LAYER object define the input
<br>&nbsp;&nbsp;&nbsp; # projection--this is the native projection of your data.<br>&nbsp;&nbsp;&nbsp; PROJECTION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;init=epsg:4326&quot;<br>&nbsp;&nbsp;&nbsp; END</p>
<p>&nbsp;&nbsp;&nbsp; # CLASSITEM defines the non-spatial attribute that you will be using to<br>&nbsp;&nbsp;&nbsp; # separate a layer into classes.&nbsp; This attribute will be in the DBF file<br>&nbsp;&nbsp;&nbsp; # of your shapefile (it will be different for each data format).&nbsp; In this
<br>&nbsp;&nbsp;&nbsp; # example the shapefile states_ugl has an associated database <br>&nbsp;&nbsp;&nbsp; # (states_ugl.dbf) that contains an attribute called &quot;CLASS&quot;.&nbsp; You will be<br>&nbsp;&nbsp;&nbsp; # using two values in the CLASS attribute to separate the classes (also 
<br>&nbsp;&nbsp;&nbsp; # called themes) used in this layer--land and water.&nbsp; CLASSITEM is used in <br>&nbsp;&nbsp;&nbsp; # association with the EXPRESSION parameter in the CLASS object.&nbsp; See below.<br>&nbsp;&nbsp;&nbsp; #CLASSITEM&nbsp;&nbsp;&nbsp; &quot;CLASS&quot;</p>
<p>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL&nbsp;&nbsp;&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 232 90 232<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp; END # ROAD LINE&nbsp; layer ends here</p>
<p><br>LAYER # RAIL LINE layer begins here<br>&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; water<br>&nbsp;&nbsp;&nbsp; DATA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; water<br>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OFF<br>&nbsp;&nbsp;&nbsp; TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LINE</p>
<p>&nbsp;&nbsp;&nbsp; # Here&#39;s an example of the input projection definition.<br>&nbsp;&nbsp;&nbsp; # EPSG:4326 is code for geographic (latlong) projection<br>&nbsp;&nbsp;&nbsp; # using the WGS84 datum.<br>&nbsp;&nbsp;&nbsp; #<br>&nbsp;&nbsp;&nbsp; # PROJECTION objects within the LAYER object define the input
<br>&nbsp;&nbsp;&nbsp; # projection--this is the native projection of your data.<br>&nbsp;&nbsp;&nbsp; PROJECTION<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;init=epsg:4326&quot;<br>&nbsp;&nbsp;&nbsp; END</p>
<p>&nbsp;&nbsp;&nbsp; # CLASSITEM defines the non-spatial attribute that you will be using to<br>&nbsp;&nbsp;&nbsp; # separate a layer into classes.&nbsp; This attribute will be in the DBF file<br>&nbsp;&nbsp;&nbsp; # of your shapefile (it will be different for each data format).&nbsp; In this
<br>&nbsp;&nbsp;&nbsp; # example the shapefile states_ugl has an associated database <br>&nbsp;&nbsp;&nbsp; # (states_ugl.dbf) that contains an attribute called &quot;CLASS&quot;.&nbsp; You will be<br>&nbsp;&nbsp;&nbsp; # using two values in the CLASS attribute to separate the classes (also 
<br>&nbsp;&nbsp;&nbsp; # called themes) used in this layer--land and water.&nbsp; CLASSITEM is used in <br>&nbsp;&nbsp;&nbsp; # association with the EXPRESSION parameter in the CLASS object.&nbsp; See below.<br>&nbsp;&nbsp;&nbsp; #CLASSITEM&nbsp;&nbsp;&nbsp; &quot;CLASS&quot;</p>
<p>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SYMBOL&nbsp;&nbsp;&nbsp;&nbsp; 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 232 90 232<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp; END # WATER LINE&nbsp; layer ends here</p>
<p>&nbsp; LAYER # States line layer begins here<br>&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; county_line#緩侃廣吭曝蛍寄弌亟<br>&nbsp;&nbsp;&nbsp; DATA&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COUNTY<br>&nbsp;&nbsp;&nbsp; STATUS&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OFF<br>&nbsp;&nbsp;&nbsp; TYPE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; line</p>
<p><br>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; NAME&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &quot;State Boundary&quot;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR&nbsp;&nbsp;&nbsp; 32 32 32<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;<br>&nbsp; END # States line layer ends here<br>&nbsp;&nbsp; <br>&nbsp; # End of LAYER DEFINITIONS -------------------------------
</p>
<p>END # All map files must come to an end just as all other things must come to...<br></p>
<p><a href="http://localhost:8080/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/tianjin_test.map&amp;layer=rail&amp;layer=road&amp;layer=county&amp;layer=water&amp;layer=county_line&amp;mode=map">http://localhost:8080/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/tianjin_test.map&amp;layer=rail&amp;layer=road&amp;layer=county&amp;layer=water&amp;layer=county_line&amp;mode=map
</a></p>
<p>&nbsp;</p>
<p>it looks just like what i want..now i want to use this mapfile into a template,just like turorial doing . </p>
<p>&nbsp;</p>
<p>so&nbsp;i add some keword, in the map object&nbsp; before layer object. </p>
<p>TEMPLATEPATTERN &#39;tianjin_test.html&#39;<br>&nbsp; WEB<br>&nbsp;&nbsp;&nbsp; TEMPLATE&nbsp; &#39;tianjin_test.html&#39;<br>&nbsp;&nbsp;&nbsp; IMAGEPATH &#39;/ms4w/tmp/ms_tmp/&#39;<br>&nbsp;&nbsp;&nbsp; IMAGEURL&nbsp; &#39;/ms_tmp/&#39;<br>&nbsp; END # Every object in MapServer must have an END.;)
</p>
<p>&nbsp; #<br>&nbsp; # Start of legend<br>&nbsp; #<br>&nbsp; LEGEND<br>&nbsp;&nbsp;&nbsp; KEYSIZE 12 12<br>&nbsp;&nbsp;&nbsp; LABEL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE BITMAP<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE MEDIUM<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 89<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; STATUS ON<br>&nbsp; END</p>
<p>the template file is just like toturial </p>
<p>&nbsp;</p>
<p>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;MapServer Workshop&lt;/title&gt;<br>&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;text/html; charset=iso-8859-1&quot;&gt;<br>&lt;link type=&quot;text/css&quot; rel=&quot;stylesheet&quot; href=&quot;/tutorial/ms35.css&quot; /&gt;
<br>&lt;/head&gt;</p>
<p>&lt;body bgcolor=&quot;#FFFFFF&quot; text=&quot;#000000&quot;&gt;<br>&lt;table width=&quot;601&quot; align=&quot;center&quot;&gt;<br>&lt;tr&gt;<br>&nbsp;&nbsp;&nbsp; &lt;td width=&quot;593&quot;&gt;<br>&nbsp;&lt;h3 align=&quot;center&quot;&gt;Example 
2.1: Zoom and Pan Controls&lt;/h3&gt;</p>
<p>&lt;!-- START OF MAPSERVER FORM --&gt;<br>&lt;form name=&quot;mapserv&quot; method=&quot;GET&quot; action=&quot;/cgi-bin/mapserv.exe&quot;&gt;</p>
<p>&lt;!-- HIDDEN MAPSERVER CGI VARIABLES --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;input type=&quot;hidden&quot; name=&quot;map&quot; value=&quot;[map]&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;input type=&quot;hidden&quot; name=&quot;imgext&quot; value=&quot;[mapext]&quot;&gt;
<br>&nbsp;&nbsp;&nbsp; &lt;input type=&quot;hidden&quot; name=&quot;imgxy&quot; value=&quot;399.5 299.5&quot;&gt;<br>&nbsp;&nbsp;&nbsp; <br>&lt;table width=&quot;400&quot; border=&quot;0&quot; align=&quot;center&quot;&gt;<br>&nbsp; &lt;tr&gt; <br>&nbsp;&nbsp;&nbsp; &lt;td&gt;
<br>&nbsp;&lt;table width=&quot;400&quot; border=&quot;1&quot;&gt;<br>&nbsp;&nbsp; &lt;tr&gt; <br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;</p>
<p>&lt;!-- SPECIFY MAP MODE --&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div align=&quot;center&quot;&gt;Map Mode:&lt;br&gt;<br>&nbsp;&nbsp;&lt;select name=&quot;mode&quot;&gt;<br>&nbsp;&nbsp;&nbsp; &lt;option value=&quot;browse&quot;&gt;Browse&lt;/option&gt;<br>&nbsp;&nbsp;&nbsp; &lt;option value=&quot;map&quot;&gt;Map&lt;/option&gt;
<br>&nbsp;&nbsp;&lt;/select&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;<br>&lt;!-- FORM SUBMIT BUTTON --&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div align=&quot;center&quot;&gt;<br>&nbsp;&nbsp;&lt;input type=&quot;submit&quot; name=&quot;submit&quot; value=&quot;Refresh&quot;&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;td&gt;<br>&lt;!-- ZOOM/PAN CONTROLS --&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div align=&quot;center&quot;&gt;Map Control: &lt;br&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;select name=&quot;zoom&quot;&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=&quot;4&quot; [zoom_4_select]&gt;Zoom In 4x&lt;/option&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=&quot;3&quot; [zoom_3_select]&gt;Zoom In 3x&lt;/option&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=&quot;2&quot; [zoom_2_select]&gt;Zoom In 2x&lt;/option&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=&quot;1&quot; [zoom_1_select]&gt;Recenter&lt;/option&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=&quot;-2&quot; [zoom_-2_select]&gt;Zoom Out 2x&lt;/option&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=&quot;-3&quot; [zoom_-3_select]&gt;Zoom Out 3x&lt;/option&gt;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;option value=&quot;-4&quot; [zoom_-4_select]&gt;Zoom Out 4x&lt;/option&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/select&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/div&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<br>&nbsp;&nbsp; &lt;/tr&gt;<br>&nbsp;&nbsp; &lt;tr&gt;<br>
&lt;!-- DISPLAY THE MAPSERVER-CREATED MAP IMAGE --&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;td colspan=&quot;3&quot; align=&quot;center&quot; valign=&quot;top&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;input type=&quot;image&quot; name=&quot;img&quot; src=&quot;[img]&quot; width=&quot;800&quot;
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; height=&quot;600&quot; border=&quot;0&quot;&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; &lt;/td&gt;<br>&nbsp;&nbsp; &lt;/tr&gt;<br>&nbsp;&lt;/table&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/td&gt;<br>&nbsp; &lt;/tr&gt;<br>&lt;/table&gt;<br>&lt;/form&gt;<br>&lt;/td&gt;&lt;/tr&gt;<br>&lt;/table&gt;
<br>&lt;/body&gt;<br>&lt;/html&gt;</p>
<p>so when i open this webpage, it shows me a picture just like what i want</p>
<p><a href="http://localhost:8080/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/tianjin_template.map&amp;layer=county&amp;layer=rail&amp;layer=county_line&amp;zoom=0&amp;mode=browse&amp;root=/tutorial&amp;program=/cgi-bin/mapserv.exe&amp;map_web_template=tianjin_test.html">
http://localhost:8080/cgi-bin/mapserv.exe?map=/ms4w/apps/tutorial/htdocs/tianjin_template.map&amp;layer=county&amp;layer=rail&amp;layer=county_line&amp;zoom=0&amp;mode=browse&amp;root=/tutorial&amp;program=/cgi-bin/mapserv.exe&amp;map_web_template=tianjin_test.html
</a></p>
<p>but problem happens when i click . it should be zoom in or zoom out&nbsp; but when i click i found nothing anymore, the picture just diappear.</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>can anyone help me about it??</p>
<p><br>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p></div>
<div><br clear="all"><br>-- <br>**************************************<br>wangtie&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>TianJin Meteorological Bureau <br>TEL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>FAX<br>************************************** 
</div>