[Mapserver-users] field problem on cgi mapserv queries

Jon Shorie jshorie at medinaco.org
Fri Mar 7 07:41:27 PST 2003


--------------Boundary-00=_39YDBO0CPIM3TTEP51BG
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

I have a mapserv app running on our local intranet.  It is working pretty=
 well=20
except for one small problem

When I query on my manhole layer, It is not replacing one of the fields w=
ith=20
the data from the dbf file.  Here is the fields from the dbf:

AREA, PERIMETER, HINCKLEY_, HINCKLEY_I, MANHOLE, PROJECT, PAGE, DISTRICT,=
=20
TOWNSHIP


Here is the query result:
[HINKLEY_]=09BC-13=09300/00-7.1=09  300=09   HI

It should have an id number in the first field.

I am enclosing a file with the full html result of the query.

Is there a problem with field names that have an underscore in them?
--------------Boundary-00=_39YDBO0CPIM3TTEP51BG
Content-Type: text/html;
  charset="us-ascii";
  name="manholequery.html"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="manholequery.html"

<!-- MapServer version 3.6.3 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=TTF INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=SHAPEFILE -->
<html>
<head>
  <title>MCSE General Sewer Map Interface</title>  
</head>
<body bgcolor=#FFFFFF>

<b>SEARCH WINDOW</b>: 2201651.195000 583486.480000 2207545.475000 589380.720000<br>
<b>QUERY POINT</b>: (448, 201) image coordinates or (2206052.257400, 587406.149600) map coordinates<br>
<b>QUERY METRICS</b>: number of layers with results=1, total number of results=1<br><br>
<font size+1><b>Layer: Manholes</b></font><p>
<table cellpadding=5 cellspacing=2 border=0>
<tr>
<th>ID</th>
<th>Name</th>
<th>Project</th>
<th>Page</th>
<th>District</th>
<th>Township</th>
</tr>
<tr><td>[HINKLEY_]</td><td>J-23</td><td>300/00-1.2</td><td></td><td>300</td><td>HI</td></tr>
</table>
<hr>
Notes:<hr> 
<table>
<tr>
   <th>Township Code</th>
   <th>Township Name</th>
</tr>
<tr>
   <td>LV</lv>
   <td>Liverpool</lv>
</tr>
<tr>
   <td>BH</td>
   <td>Brunswick Hills</td>
</tr>
<tr>
   <td>HI</td>
   <td>Hinkley</td>
</tr>
<tr>
   <td>LT</td>
   <td>Litchfield</td>
</tr>
<tr>
   <td>YO</td>
   <td>York</td>
</tr>
<tr>
   <td>ME</td>
   <td>Medina</td>
</tr>
<tr>
   <td>GR</td>
   <td>Granger</td>
</tr>
<tr>
   <td>SP</td>
   <td>Spencer</td>
</tr>
<tr>
   <td>CH</td>
   <td>Chatham</td>
</tr>
<tr>
   <td>LF</td>
   <td>Lafayette</td>
</tr>
<tr>
   <td>MO</td>
   <td>Montville</td>
</tr>
<tr>
   <td>SH</td>
   <td>Sharon</td>
</tr>
<tr>
   <td>HO</td>
   <td>Homer</td>
</tr>
<tr>
   <td>HA</td>
   <td>Harrisville</td>
</tr>
<tr>
   <td>WE</td>
   <td>Westfield</td>
</tr>
<tr>
   <td>GU</td>
   <td>Guilford</td>
</tr>
<tr>
   <td>WA</td>
   <td>Wadsworth</td>
</tr></table>
		<br>
		<p>

  <font size=+1 face=arial,helvetica><b>Query Map Examples</b></font>
  <p>

  <table cellpadding="3" cellspacing="0" border="0">
    <tr><td><img border="2" src="/tmp/MCSE104704958321941.png"></td>
    <td><img border="2" src="/cgi-bin/mapserv/mapserv?map=/var/www/html/mcse13/mcse.map&queryfile=/var/www/html/tmp/DEMO104704958321941.qy&mode=map&size=200+200"></td></tr>
    <tr><th align="center">standard querymap</th>
    <th align="center">cached query</th></tr>
  </table>

  <script language="javascript">
    var regex = /WMS_SERVER/;
    var layers = "";
    var bbox = "2201651.195000 583486.480000 2207545.475000 589380.720000";

    if(regex.test("MapServer version 3.6.3 OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP SUPPORTS=TTF INPUT=TIFF INPUT=EPPL7 INPUT=JPEG INPUT=SHAPEFILE"))
      document.write("<p><a href=\"/cgi-bin/mapserv/mapserv?map=/var/www/html/mcse13/mcse.map&REQUEST=GetFeatureInfo&query_layers=" + layers.replace(/ /g, ',') + "&VERSION=1.1.0&x=448&y=201&INFO_FORMAT=gml&bbox=" + bbox.replace(/ /g, ',') +  "\">download GML version</a></p>\n")

  </script>

  </body>
</html>

--------------Boundary-00=_39YDBO0CPIM3TTEP51BG--




More information about the MapServer-users mailing list