loading images in the map to perform a function

Albert Anderson bart_doggers at YAHOO.COM
Wed Jul 12 11:31:00 EDT 2006


Hi All,

 I am loading information of a map into a template.  I click a button and it loads.  But my images that I created for zooming in, zooming out, refresh, and etc are not showing up.  How do you get them to show up and working?  Do you need to put something in the html or in the map file that will load the images that I created?  Where do I start? Can some help me? Heres my html and map file.

html buttton
<body>
  <form method=POST action="/cgi-bin/mapserv">
    <input type="submit" value="Click to initialize">
    <input type="hidden" name="program" value="mapserv">
    <input type="hidden" name="map" value="/home/mapdata/richland.map">
    <input type="hidden" name="mapext" value="-97.493440 45.811874 -96.293436 46.711877">
    <input type="hidden" name="zoomsize" size="2" value="2">
    <input type="hidden" name="layers" 
        value="roads">
  </form>
 </body>
</html>

html template
<body>
<form name="the_form" method=GET action="[program]">
<table width="772" height="34" border="0">
  <tr>
    <td width="126" height="30">   
    <TD ALIGN="left" VALIGN="bottom" WIDTH="110">
                                  <IMG ID="zoomin" HEIGHT="26" WIDTH="26" SRC='images/zoomin.gif' alt="zoom in"><IMG SRC='images/zoomout.gif' alt="zoom out" name="zoomout"
                                  WIDTH="26" HEIGHT="26" ID="zoomout"><IMG SRC='images/zoomrecenter.gif' alt="zoom recenter" WIDTH="26" HEIGHT="26" ID="recenter"><IMG SRC='images/earthfullzoom.gif' alt="full zoom" WIDTH="26" HEIGHT="26"
                                  ID="fullview"></TD>

              <!-- History Tools -->
                                <TD ALIGN="center" VALIGN="bottom" WIDTH="70">
                                <IMG SRC='images/back.gif' alt="back" WIDTH="26" HEIGHT="26" ID="back"><IMG SRC='images/forward.gif' alt="forward"
                                  WIDTH="26" HEIGHT="26" ID="forward"></TD>
              <!-- Refresh Tool -->
                                <TD ALIGN="center" VALIGN="bottom" WIDTH="29">
                                  <IMG SRC='images/refreshicon.gif' value="Refresh" alt="refresh" WIDTH="26" HEIGHT="26"></TD>
              <!-- Print -->
                                <TD ALIGN="center" VALIGN="bottom" WIDTH="45">
                                  <IMG SRC='images/print_off.gif' alt="print" WIDTH="26" HEIGHT="26" ID="print"></TD>

              <!-- Feature Info -->
                                <TD ALIGN="center" VALIGN="bottom" WIDTH="56">
                                  <IMG SRC='images/identify_off.gif' alt="indentify" WIDTH="26" HEIGHT="26" ID="query"><IMG SRC='images/nquery_off.gif' alt="nquery"
                                  WIDTH="26" HEIGHT="26" ID="nquery"></TD>
              <!-- Measure Tools -->
                                <TD width="306" VALIGN="bottom">                                  

                                  <SELECT NAME="quickzoom" ID="quickzoom"
                                    ONCHANGE="change_zoomto()">
                                     <OPTION VALUE="0" SELECTED="selected">Zoom to
                                        Place...</OPTION>
                                     <OPTION VALUE="0">............</OPTION>
                                     <OPTION VALUE="1">Richland County</OPTION>
                                     <OPTION VALUE="0"></OPTION>
                                     <OPTION VALUE="0">-- Municipality --</OPTION>
                                     <OPTION VALUE="2">Abercrombie</OPTION>

                                     <OPTION VALUE="3">Barney</OPTION>
                                     <OPTION VALUE="4">Christine</OPTION>
                                     <OPTION VALUE="5">Colfax</OPTION>
                                     <OPTION VALUE="6">Dwight</OPTION>
                                     <OPTION VALUE="7">Fairmount</OPTION>
                                     <OPTION VALUE="8">Great Bend</OPTION>

                                     <OPTION VALUE="9">Hankinson</OPTION>
                                     <OPTION VALUE="10">Lidgerwood</OPTION>
                                     <OPTION VALUE="11">Mantador</OPTION>
                                     <OPTION VALUE="12">Mooreton</OPTION>
                                     <OPTION VALUE="13">Wahpeton</OPTION>
                                     <OPTION VALUE="14">Walcott</OPTION>

                                     <OPTION VALUE="15">Wyndmere</OPTION>
                                     <OPTION VALUE="0"></OPTION>
                                     <OPTION VALUE="0">-- Township --</OPTION>
                                     <OPTION VALUE="16">Abercrombie</OPTION>
                                     <OPTION VALUE="17">Antelope</OPTION>
                                     <OPTION VALUE="18">Barney</OPTION>

                                     <OPTION VALUE="19">Barrie</OPTION>
                                     <OPTION VALUE="20">Belford</OPTION>
                                     <OPTION VALUE="21">Brandenburg</OPTION>
                                     <OPTION VALUE="22">Brightwood</OPTION>
                                     <OPTION VALUE="23">Center</OPTION>
                                     <OPTION VALUE="24">Colfax</OPTION>

                                     <OPTION VALUE="25">Danton</OPTION>
                                     <OPTION VALUE="26">De Villo</OPTION>
                                     <OPTION VALUE="27">Dexter</OPTION>
                                     <OPTION VALUE="28">Duerr</OPTION>
                                     <OPTION VALUE="29">Dwight</OPTION>
                                     <OPTION VALUE="30">Eagle</OPTION>

                                     <OPTION VALUE="31">Elma</OPTION>
                                     <OPTION VALUE="32">Fairmount</OPTION>
                                     <OPTION VALUE="33">Freeman</OPTION>
                                     <OPTION VALUE="34">Garborg</OPTION>
                                     <OPTION VALUE="35">Grant</OPTION>
                                     <OPTION VALUE="36">Greendale</OPTION>

                                     <OPTION VALUE="37">Helendale</OPTION>
                                     <OPTION VALUE="38">Homestead</OPTION>
                                     <OPTION VALUE="39">Ibsen</OPTION>
                                     <OPTION VALUE="40">Lamars</OPTION>
                                     <OPTION VALUE="41">Liberty Grove</OPTION>
                                     <OPTION VALUE="42">Mooreton</OPTION>

                                     <OPTION VALUE="43">Moran</OPTION>
                                     <OPTION VALUE="44">Nansen</OPTION>
                                     <OPTION VALUE="45">Sheyenne</OPTION>
                                     <OPTION VALUE="46">Summit</OPTION>
                                     <OPTION VALUE="47">Viking</OPTION>
                                     <OPTION VALUE="48">Walcott</OPTION>

                                     <OPTION VALUE="49">Waldo</OPTION>
                                     <OPTION VALUE="50">West End</OPTION>
                                     <OPTION VALUE="51">Wyndmere</OPTION>
                                  </SELECT> </TD>
<!-- MEASURE UNITS * START -->
<!--
              <td width="113">
                  <select id="unit" name="unit" onchange="javascript:switchUnit();">
                      <option value="m">Meters</option>
                      <option value="km">Kilometers</option>
                      <option value="mi">Miles</option>
                      <option value="yd">Yards</option>
                      <option value="ft">Feet</option>
                      <option value="in">Inches</option>
                  </select>
              </td>
-->
<!-- MEASURE UNITS * END -->
  </tr>
</table>
<table width="725" height="22" border="0">
  <tr>
    <td width="200" height="18"><span class="style5">Map Scale: [scale] </span></td>
    <td width="200" class="style5">Click x, y: [mapx], [mapy]</td>
    <td width="222" class="style5">Map Extent: [mapext]</td>
  </tr>
</table>
<!-- Map Main Window with panning controls -->
                        
                                  <table width="177" height="505" border="0" align="left">
                                    <tr>
                                      <td width="171" height="501"><table width="166" height="161" border="1">
                                        <tr>
                                          <td height="157"><img SRC="[ref]"></td>
                                        </tr>
                                      </table>
                                      <table width="167" height="345" border="0">
                                        <tr>
                                          <td width="161" height="306"><table width="164" height="37" border="1" bgcolor="#e7a500">
                                              <tr>
                                                <td width="152"><div align="center"><span class="style2">Map Layers</span> </div></td>
                                              </tr>
                                            </table>
                                              <table width="164" height="248" border="0">
                                                <tr>
                                                  <td width="154" height="236">
                                                    <iframe src="maplayers.html" width=154 height=236 title="Map Layers"> If you can see this, your browser doesn't understand IFRAME. However, we'll still <a href="maplayers.html">link</a> you to the file. </iframe>
&nbsp;</td>
                                                </tr>
                                            </table></td>
                                        </tr>
                                      </table>
                                      </td>
                                    </tr>
</table>
                                  <TABLE width="356"
                                    HEIGHT="460" BORDER="0" align="left" CELLPADDING="0" CELLSPACING="0">

                                     <TBODY>
                                        <TR>
                                          <TD width="19" height="23" ALIGN="left"
                                            VALIGN="top" BGCOLOR="#e7a500"><img src="images/cornerarrow5.gif" alt="nw" width="25" height="25" /></TD>
                                          <TD ALIGN="center" BGCOLOR="#e7a500"
                                            VALIGN="top"> <div align="center"><img src="images/cornerarrow2.gif" alt="North" width="25" height="25" /></div></TD>
                                          <TD width="18" ALIGN="right"
                                            VALIGN="top" BGCOLOR="#e7a500"><img src="images/cornerarrow6.gif" alt="ne" width="25" height="25" /></TD>
                                        </TR>

                                        <TR>
                                          <TD ALIGN="LEFT" BGCOLOR="#e7a500"
                                            VALIGN="MIDDLE"><img src="images/cornerarrow1.gif" alt="North" width="25" height="25" /></TD>
                                          <TD CLASS="mapappmidaln" ALIGN="center"
                                            HEIGHT="413" VALIGN="MIDDLE" WIDTH="311">
                                             
<!-- calling for map here -->
                                              <input name="img" type="image" src="[img]" WIDTH="309" HEIGHT="417" BORDER="1" /></TD>
                                          <TD ALIGN="right" BGCOLOR="#e7a500"
                                            VALIGN="MIDDLE"><div align="left"><img src="images/cornerarrow3.gif" alt="East" width="25" height="25" /></div></TD>
                                        </TR>
                                        <TR>
                                          <TD height="21" ALIGN="left"
                                            VALIGN="bottom" BGCOLOR="#e7a500"><img src="images/cornerarrow8.gif" alt="sw" width="25" height="25" /></TD>
                                          <TD ALIGN="center" BGCOLOR="#e7a500"
                                            VALIGN="bottom"> <div align="center"><img src="images/cornerarrow3gif.gif" alt="South" width="25" height="25" /></div></TD>
                                          <TD ALIGN="right" BGCOLOR="#e7a500"
                                            VALIGN="bottom"><img src="images/cornerarrow7.gif" alt="se" width="25" height="25" /></TD>
</table>
                                  <table width="276" height="469" border="0">
                                    <tr>
                                      
                                      <td width="274" height="323"><FORM NAME="searchbyattrib" ACTION="javascript:searchbyattrib();"><A HREF="HelpPage.html" TARGET="_blank" CLASS="adv">Help
                        Page</A>
                <br><br>
                  Search for a Parcel:<br>
                     <SELECT NAME="field" ID="searchfield">
                        <OPTION VALUE="PIN" SELECTED="SELECTED">Parcel ID</OPTION>

                        <OPTION VALUE="NAME">Owner's Last Name</OPTION>
                     </SELECT><br><INPUT ID="searchattrib" TYPE="text" SIZE="20"
                     NAME="searchtext" VALUE="nothing"> <INPUT TYPE="submit" VALUE="Search">
                  </FORM>
                                       
                                      <div id="search_results" class="coords"
                  style="clear:both;position:relative;width: 259px; height: 300px; border: none; overflow: auto;">&nbsp;</div></td>
                                    </tr>
</table>
                                  <br />
                                  <table width="721" border="0">
                                    <tr>
                                      <td width="727"><div align="left"><span class="style4"><strong><a href="http://www.mylocalgov.com/richlandcountynd/" target="_blank"><strong>Richland County</strong></a> |<a href="mainbank.html"> <strong>RC GIS Home</strong></a><strong> | </strong></strong><a href="http://www.ecvirtual.net/RC_GIS/phpBB2/index.php"><strong>CGISTC Forum</strong></a> | <a href="partners.html"><strong>GIS Partners</strong></a></span><span class="style4"><a href="http://ecvirtual.net/RC_GIS/partners.html"></a></span></div>
                                        <span class="style4"><a href="http://ecvirtual.net/RC_GIS/partners.html"><div align="center"></div>
                                      </a></span></td>
                                    </tr>
                                  </table>
                                  <p align="center" class="style4"><strong><a href="http://www.mylocalgov.com/richlandcountynd/" target="_blank"><strong><br />
                                  </strong></a></strong></p>
                                  <p>&nbsp;</p>
                                  <p>&nbsp;</p>
                          
</body>
</html>

map file
#This is Richland County Map Server
NAME "Richland"
SIZE 309 417
IMAGECOLOR 255 255 255
IMAGETYPE JPEG
SHAPEPATH "/home/mapdata/"
EXTENT     -97.493440 45.811874 -96.293436 46.711877
#################################### 
# Symbol for drawing fat lines
#
SYMBOL
     NAME "BigLine"
     TYPE ELLIPSE
     POINTS 1 1 END
END

##################################### 
# Symbol for drawing dashed lines
#
SYMBOL
     NAME "DashedLine"
     TYPE ELLIPSE
     POINTS 1 1 END
     STYLE 10 10 END   
END

##################################### 
# Symbol for drawing spots
#
SYMBOL
     NAME "Circle"
     FILLED true
     TYPE ellipse
     POINTS 1 1 END
END

##################################### 
# Web object
#
WEB
  TEMPLATE '/var/www/htdocs/gismapserver_test_project.html'
  IMAGEPATH '/var/www/htdocs/tmp/'
  IMAGEURL '/tmp/'
END

##################################### 
# Reference map
#
REFERENCE
     IMAGE "/var/www/htdocs/third_usaref.gif"
     SIZE 200 200
     EXTENT -180.00 0.00 -60.00 90.00
     STATUS ON
     COLOR -1 -1 -1
     OUTLINECOLOR 255 0 0
END

#####################################  
# Scalebar
#
SCALEBAR
     LABEL
          COLOR 0 0 0 
          ANTIALIAS true
          SIZE small
     END
     POSITION lr
     INTERVALS 5
     STATUS embed
     SIZE 144 5
     STYLE 0
     UNITS miles
     BACKGROUNDCOLOR 255 0 0
     IMAGECOLOR 255 255 255
     COLOR 128 128 128     
     OUTLINECOLOR 0 0 255
     TRANSPARENT off
END

##################################### 
LAYER
    NAME "Richland"
    STATUS default
    TYPE line
    DATA "roads_shp"
    CLASS
      STYLE
            COLOR 255 0 0
      END
  END
END
END

 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060712/19581e19/attachment.html


More information about the mapserver-users mailing list