[mapserver-users] Itemquery problem

Matthew Hatcher MJHatcher at space.qinetiq.com
Thu Aug 1 03:47:06 PDT 2002


Hi all,
I'm having problems using the itemquery mode of Mapserver 3.6.1. I'm wanting
to have a text box which the user enters a postcode, which then queries a
shapefile containing postcode points. This then returns a query map of that
area. At least to start anyway.

Whatever I do and whatever is entered, itemquery returns the first record,
and itemnquery returns all the records.

What am I doing wrong? Any help would be appreciated, especially if it
includes examples of how to do it right!!

Matt Hatcher


<-- test.html -->
<html>
<body>
Enter postcode:

<form method="get" action="/cgi-bin/mapserv.exe">

<input type="hidden" name="map" value="test.map">
<input type="hidden" name="map_web_imagepath" value="\Inetpub\wwwroot\tmp\">
<input type="hidden" name="map_web_imageurl" value="/tmp/">
<input type="hidden" name="program" value="/cgi-bin/mapserv.exe">

<input type="hidden" name="mode" value="itemnquery">
<input type="hidden" name="qlayer" value="postcodes">
<input type="hidden" name="item" value="PCODE">
<input type="hidden" name="mapext" value="shapes">
<input type="hidden" name="buffer" value="1000">

<input type="text" name="value" size="10" value="">
<input type="submit" value="Go!">

</form>
</body>
</html>

<-- test.map (the relevant bits!) -->

QUERYMAP
  SIZE 300 300
  STATUS ON
  STYLE HILITE
  COLOR 255 0 0
END

LAYER
  NAME "postcodes"
  TYPE POINT
  STATUS OFF
  DATA postcodes

  TEMPLATE "query.html"
  FILTER "PCODE<>''"
  
  CLASS
    COLOR 192 192 192
    SYMBOL "circle"
    SIZE 3
  END
END

<-- end -->


**********************************************************************
The information contained in this email and any subsequent
 correspondence is private and is intended solely for the 
intended recipient(s). For those other than the intended
 recipient(s) any disclosure, copying, distribution, or any 
action taken or omitted to be taken in reliance on such 
information is prohibited and may be unlawful.
**********************************************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20020801/c99a7a4d/attachment.htm>


More information about the MapServer-users mailing list