question on query

Albert Anderson bart_doggers at YAHOO.COM
Thu Aug 10 07:49:58 PDT 2006


Hi Lawrence,

 I tried copying your code and changing out your information to fit mine.  Its not working to well.  My button isnt doing anything.  Here is my html code. Maybe you can look at it?  I dont know what I am doing.  Thanks, Albert

<!-- MapServer version 4.6.0 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=PDF OUTPUT=SWF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=GEOS INPUT=TIFF INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<meta name="description" content="Richland County Map Server" />
<meta name="keywords" content="maps, server, map server, Richland County" />
<meta name="author" content="Albert Anderson" />
<title>Richland County GIS Map Server</title>
<style type="text/css">
<!--
.style2 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
}
.style4 {
    font-family: "Times New Roman", Times, serif;
    font-size: 12px;
}
.style5 {
    font-family: Arial, Helvetica, sans-serif;
    font-size: xx-small;
}
.style6 {color: #000000}
.style17 {font-size: 8px}
.style18 {
    font-family: Arial, Helvetica, sans-serif;
    font-weight: bold;
}
.style20 {font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; }
.style21 {font-size: 14px}
-->
</style>
<script language="JavaScript" type="text/javascript">
<!--
function setMode()
// set map mode to the previous mode
{   document.the_map.mode.selectedIndex=0;
    for (i=0;i<document.the_map.mode.length;i++){
        if (document.the_map.mode[i].value == 
                document.the_map.previousmode.value){
           document.the_map.mode.selectedIndex=i;
        }
    }
};
// -->
</script>

<!-- Panning Javascript here -->
<script language="javascript" type="text/javascript">
  var mapheight = 417;
  var mapwidth = 309;
  var pansize = 0.75;

function pan(direction) {
  var x,y;
  
 if(direction== 'n') {
   x = (309-1)/2.0;
   y = 0 - (417 * pansize)/2.0;
 } else if(direction== 'nw') {
   x = 0 - (309 * pansize)/2.0;
   y = 0 - (309 * pansize)/2.0;
 } else if(direction== 'ne') {
   x = (309-1) + (309 * pansize)/2.0;
   y = 0 - (417 * pansize)/2.0;
 } else if(direction== 's') {
   x = (309-1)/2.0;
   y = (417-1) + (417 * pansize)/2.0;
 } else if(direction== 'sw') {
   x = 0 - (309 * pansize)/2.0;
   y = (417-1) + (417 * pansize)/2.0;
 } else if(direction== 'se') {
   x = (309-1) + (309 * pansize)/2.0;
   y = (417-1) + (417 * pansize)/2.0;
 } else if(direction== 'e') {
   x = (309-1) + (309 * pansize)/2.0;
   y = (417-1)/2.0;
 } else if(direction== 'w') {
   x = 0 - (309 * pansize)/2.0;
   y = (417-1)/2.0;
    }
 document.mapserv.mode[0].checked = true; // force browse
 document.mapserv.zoomdir[1].checked = true; // force pan
 document.mapserv.imgxy.value = x + " " + y;
 document.mapserv.submit();  
}        

</script>

<SCRIPT TYPE="text/javascript" LANGUAGE="javascript">
  function SetSec(){
    var s = document.Corner.SCT.value;
    var t = document.Corner.T.value;
    var r = document.Corner.R.value;

window.parent.location.href ="http://10.56.67.192/cgi-bin/mapserv?map=richland.map&zoomsize=2&layers=section aerial&mode=itemquery&mapext=shapes&slayer=sections&imgxy=309 419&imgext=625173.309834 5085113.091715 718065.960556 5160035.212592&mapshape=&imgshape=&imgbox=&qstring=('[SCT]'='" + s + "' AND '[TWP]'='" + t + "' AND '[RNG]'='" + r + "')&qlayer=Section Parcels&qitem=&shapeindex=&savequery=";
}
</SCRIPT>

</head>
<body onload="setMode()">

<!-- Form tag here -->
<form name="the_form" method=GET action="[program]">
<!-- Map Main Window with panning controls -->
<table width="160" border="0" align="left">
  <tr bgcolor="#e7a500">
    <td width="170" height="471" bgcolor="#FFFFFF">
      <div align="left">
        <table width="164" height="30" border="0" bgcolor="#e7a500">
          <tr>
            <td width="152" height="26"><div align="center"><span class="style20">Map Tools </span></div></td>
          </tr>
        </table>
        <table width="170" height="55" border="0">
          <tr>
            <td width="159" height="51">
<!-- Map Tools here -->              
                <p class="style1">
                <input type="radio" name="zoomdir" value="0" [zoomdir_0_check] />
                <img src="../images/zoomrecenter.gif" width="25" height="25" />
                <input type="radio" name="zoomdir" value="1" [zoomdir_1_check] />
                <img src="../images/zoomin.gif" width="25" height="25" />
                <input type="radio" name="zoomdir" size="1" value="-1" [zoomdir_-1_check] />
                <img src="../images/zoomout.gif" width="25" height="25" /> </p></td>
          </tr>
        </table>

<!-- Map Layer table -->
        <table width="164" height="30" border="0" bgcolor="#e7a500">
          <tr>
            <td width="152" height="26"><div align="center"><span class="style20">Map Layers </span></div></td>
          </tr>
        </table>
        <table width="170" height="272" border="0">
          <tr>
          <td width="159" height="268"><font color="black"><span class="style2"><u>Boundaries</u></span></font><br />
          <span class="style4">  
             <input type="checkbox" name="layer2" value="boundary" [boundary_check]/>
          County <br />
           
             <input type="checkbox" name="layer2" value="townships" [townships_check] />
          Township<br />
           
             <input type="checkbox" name="layer2" value="sections" [sections_check]/>
          Section</span><br />
         <span class="style4">  
             <input type="checkbox" name="layer2" value="parcels" [parcels_check]/>
         Parcels <em><a href="#parel_search">(Search)</a><br />
          
             <input type="checkbox" name="layer2" value="cities" [cities_check]/>
         </em>City </span> <br /><span class="style2"><u>Environment</u></span><br />
         <span class="style4">  
             <input type="checkbox" name="layer" value="rivers" [rivers_check]/>
         Rivers <br />
          
             <input type="checkbox" name="layer" value="lakes" [lakes_check]/>
         Lakes </span><br />
         <font color="red"> </font><span class="style2"><u>Transportation</u></span><br />
         <span class="style4">  
             <input type="checkbox" name="layer" value="railroad" [railroad_check]/>
         Railroad <br />
          
             <input type="checkbox" name="layer" value="roads" [roads_check]/>
         Roads</span><br />
         <span class="style1"><span class="style2"><span class="style6"><u>Backgrounds</u></span></span><br />
         <span class="style4">  
             <input type="checkbox" name="layer" value="aerial" [aerial_check]/>
         Aerial Photos<br />
              <span class="style17">       (2003 FSA-NAIP) </span></span></span> </td>
         </tr>
        </table>
        <p> </p>
        <p> </p>
      </div></td>
  </tr>
</table>
                                  
<!-- Map Image Table -->                                      <TABLE width="368"
                                    HEIGHT="460" BORDER="0" align="left" CELLPADDING="0" CELLSPACING="0">

                                     <TBODY>
                                        <TR>
<!-- Panning Arrows Images -->                          <TD width="29" height="23" ALIGN="left"
                                            VALIGN="top" BGCOLOR="#e7a500"><a href="javascript:pan('nw')"><img src="../images/cornerarrow5.gif" alt="pan nw" width="25" height="25" style="border-style:none"></a></TD>
                                          <TD ALIGN="center" BGCOLOR="#e7a500"
                                            VALIGN="top"> <div align="center"><a href="javascript:pan('n')"><img src="../images/cornerarrow2.gif" alt="pan north" width="25" height="25" style="border-style:none"></a></div></TD>
                                          <TD width="30" ALIGN="right"
                                            VALIGN="top" BGCOLOR="#e7a500"><a href="javascript:pan('ne')"><img src="../images/cornerarrow6.gif" alt="pan ne" width="25" height="25" style="border-style:none"></a></TD>
                                        </TR>

                                        <TR>
                                          <TD ALIGN="LEFT" BGCOLOR="#e7a500"
                                            VALIGN="MIDDLE"><a href="javascript:pan('w')"><img src="../images/cornerarrow1.gif" alt="pan west" width="25" height="25" style="border-style:none"></a></TD>
                                          <TD CLASS="mapappmidaln" ALIGN="center"
                                            HEIGHT="413" VALIGN="MIDDLE" WIDTH="309">
                                             
<!-- 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"><a href="javascript:pan('e')"><img src="../images/cornerarrow3.gif" alt="pan east" width="25" height="25" style="border-style:none"></a></div></TD>
                                        </TR>
                                        <TR>
                                          <TD height="21" ALIGN="left"
                                            VALIGN="bottom" BGCOLOR="#e7a500"><a href="javascript:pan('sw')"><img src="../images/cornerarrow8.gif" alt="pan sw" width="25" height="25" style="border-style:none"></a></TD>
                                          <TD ALIGN="center" BGCOLOR="#e7a500"
                                            VALIGN="bottom"> <div align="center"><a href="javascript:pan('s')"><img src="../images/cornerarrow3gif.gif" alt="pan south" width="25" height="25" style="border-style:none"></a></div></TD>
                                          <TD ALIGN="right" BGCOLOR="#e7a500"
                                            VALIGN="bottom"><a href="javascript:pan('se')"><img src="../images/cornerarrow7.gif" alt="pan se" width="25" height="25" style="border-style:none"></a></TD>
    </table>

<!-- Reference Map table --> 
                                 <table width="203" height="615" border="0">
                                    <tr>
                                      <td width="197" height="611"><table width="177" height="30" border="0" bgcolor="#e7a500">
                                        <tr>
                                          <td width="171" height="26"><div align="center" class="style20">Reference Map </div></td>
                                        </tr>
                                      </table>                                      
                                        <table width="143" height="169" border="0" align="center">
                                          <tr>
<!-- calling reference map -->            <td width="137" height="165"><img src="[ref]" width="136" height="152" /></td>
                                          </tr>
                                        </table>
                                        <p>
                                          <!-- scale bar -->                        
                                          <span class="style5">Map Scale = 1: [scale]<br />
                                          </span> <span class="style5">Latitude: [mapx]<br />
                                        Longitude: [mapy]</span></p>
                                        <table width="177" height="30" border="0" bgcolor="#e7a500">
                                            <tr>
                                              <td width="171" height="26"><div align="center" class="style20">Legend</div></td>
                                            </tr>
                                        </table>
                                          <table width="177" height="262" border="0">
                                            <tr>
                                              <!-- calling reference map -->
                                              <td width="171" height="258"><img src="[legend]" /></td>
                                            </tr>
                                        </table>                                          
                                      <p> </p></td>
                                    </tr>
  </table>

 <!-- Parcel Search Table -->    


                                    <table width="550" border="0">
                                    <tr>
                                        <td colspan="4"><a name="parel_search" id="parel_search"></a>Search for a Parcel:</td>
                                      </tr>
                                    <tr>
                                      <td width="144">Section</td>
                                      <td width="150">Township</td>
                                      <td width="205">Range</td>
                                      <td width="33"> </td>
                                    </tr>
                                    <tr>
                                      <td colspan="3"><input type="text" name="SCT" value="SCT" />                                        <input type="text" name="T" value="TWP" />                                        <input type="text" name="R" value="RANGE" />
                                      <input type="Button" name="GoSec" value="Go" onclick="SetSec()" /></td>
                                      <td> </td>
                                    </tr>
                                    </table>
                                   
                                    <br />

<!-- Hidden values -->  
                                    <input type="hidden" name="imgxy" value="309 417">
                                    <input type="hidden" name="imgext" value="[mapext]">
                                    <input type="hidden" name="map" value="[map]">
                                    <input type="hidden" name="program" value="[program]">
                      <input type="hidden" name="zoomsize" value="2">
                                   
</form>
</body>
</html>

Lawrence Hartpence <hartpence_gis at co.jasper.ia.us> wrote:   Message    Sorry,  our county runs Ranges 17 - 21 and Townships 78 - 81.   Sections you know go from 1-36.
  
 Lawrence


 		
---------------------------------
Yahoo! Messenger with Voice. Make PC-to-Phone Calls to the US (and 30+ countries) for 2¢/min or less.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20060810/152ae4e9/attachment.htm>


More information about the MapServer-users mailing list