[Mapserver-users] cgi: QueryByPoint no results

K Resellmo mapserver at resellmo.com
Sun Mar 21 21:37:25 PST 2004


Hello all,

I'm trying to get mapqueries to work with Mapserver 4.0.1, but QueryByPoint 
always returns "no results." I have tried zooming in to make sure I really 
click the right point / polygon, but that has not helped. Changing the 
TOLERANCE setting did not help either.

I am using shapefiles from http://nationalatlas.gov/, and I have tried to 
use both point and polygon layers without being able to get any query results.

Help would be greatly appreciated. Below is my mapfile and template file.

Thanks in advance!

Kris

MAP
   IMAGETYPE GIF

   EXTENT -97.5 41.619778 -82.122902 49.38562
   SIZE 400 300
   SHAPEPATH "d:/vagabond/mapdata"

   WEB
     TEMPLATE  '/mapserver/web/map-query.html'
     IMAGEPATH '/mapserver/web/images/'
     IMAGEURL  '/mapserver/images/'
   END

   # Start of LAYER DEFINITIONS ---------------------------------------------

   LAYER # States polygon layer begins here
     NAME States
     DATA statesp020
     STATUS DEFAULT
     TYPE POLYGON

     CLASS
       STYLE
         COLOR 255 204 102
       END
     END
   END # States polygon layer ends here

   LAYER # States line layer begins here
     NAME States
     DATA statesp020
     STATUS DEFAULT
     TYPE LINE
     CLASS
       STYLE
         COLOR 32 32 32
       END
     END
   END # States line layer ends here


LAYER # urban areas layer begins here
      NAME urbanAreas
      DATA urbanap020
         STATUS default
      TYPE POLYGON
      CLASS
       STYLE
         COLOR 255 0 0
       END
     END
    END # end of urban areas layer
END # end of map file/object


HTML template file:
<html>
<head></head>
<body>
       <form name="mapserv" method="GET" action="/cgi-bin/mapserv.exe" 
ID="Form1">
         <input type="hidden" name="map" 
value="/mapserver/web/map-query.map" ID="Hidden1">
         <input type="hidden" name="imgext" value="[mapext]" ID="Hidden2">
         <input type="hidden" name="imgxy" value="199.5 149.5" ID="Hidden3">
           <input type="hidden" name="zoom" value="1" ID="Hidden4">
           <select name="mode">
            <option value="browse" [browse_select]>Browse </option>
            <option value="query" [query_select]>Query Single Layer</option>
            <option value="nquery" [nquery_select]>Query Multiple 
Layers</option>
           </select>
           <input type="image" name="img" src="[img]" width="400" 
height="300" ID="Image1">
      </form>
</body>
</html>





More information about the MapServer-users mailing list