[mapserver-users] Itemquery problem
Matthew Hatcher
MJHatcher@space.qinetiq.com
Thu, 1 Aug 2002 11:47:06 +0100
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_001_01C23948.C74EE460
Content-Type: text/plain; charset="ISO-8859-1"
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.
**********************************************************************
------_=_NextPart_001_01C23948.C74EE460
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; charset=3DISO-8859-=
1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version 5.5.2653.12">
<TITLE>Itemquery problem</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=3D2>Hi all,</FONT>
<BR><FONT SIZE=3D2>I'm having problems using the itemquery mode of Mapserve=
r 3.6.1. I'm wanting to have a text box which the user enters a postcode, w=
hich then queries a shapefile containing postcode points. This then returns=
a query map of that area. At least to start anyway.</FONT></P>
<P><FONT SIZE=3D2>Whatever I do and whatever is entered, itemquery returns =
the first record, and itemnquery returns all the records.</FONT>
</P>
<P><FONT SIZE=3D2>What am I doing wrong? Any help would be appreciated, esp=
ecially if it includes examples of how to do it right!!</FONT>
</P>
<P><FONT SIZE=3D2>Matt Hatcher</FONT>
</P>
<BR>
<P><FONT SIZE=3D2><-- test.html --></FONT>
<BR><FONT SIZE=3D2><html></FONT>
<BR><FONT SIZE=3D2><body></FONT>
<BR><FONT SIZE=3D2>Enter postcode:</FONT>
</P>
<P><FONT SIZE=3D2><form method=3D"get" action=3D"/cgi-bin=
/mapserv.exe"></FONT>
</P>
<P><FONT SIZE=3D2><input type=3D"hidden" name=3D"map"=
; value=3D"test.map"></FONT>
<BR><FONT SIZE=3D2><input type=3D"hidden" name=3D"map_web=
_imagepath" value=3D"\Inetpub\wwwroot\tmp\"></FONT>
<BR><FONT SIZE=3D2><input type=3D"hidden" name=3D"map_web=
_imageurl" value=3D"/tmp/"></FONT>
<BR><FONT SIZE=3D2><input type=3D"hidden" name=3D"program=
" value=3D"/cgi-bin/mapserv.exe"></FONT>
</P>
<P><FONT SIZE=3D2><input type=3D"hidden" name=3D"mode&quo=
t; value=3D"itemnquery"></FONT>
<BR><FONT SIZE=3D2><input type=3D"hidden" name=3D"qlayer&=
quot; value=3D"postcodes"></FONT>
<BR><FONT SIZE=3D2><input type=3D"hidden" name=3D"item&qu=
ot; value=3D"PCODE"></FONT>
<BR><FONT SIZE=3D2><input type=3D"hidden" name=3D"mapext&=
quot; value=3D"shapes"></FONT>
<BR><FONT SIZE=3D2><input type=3D"hidden" name=3D"buffer&=
quot; value=3D"1000"></FONT>
</P>
<P><FONT SIZE=3D2><input type=3D"text" name=3D"value"=
; size=3D"10" value=3D""></FONT>
<BR><FONT SIZE=3D2><input type=3D"submit" value=3D"Go!&qu=
ot;></FONT>
</P>
<P><FONT SIZE=3D2></form></FONT>
<BR><FONT SIZE=3D2></body></FONT>
<BR><FONT SIZE=3D2></html></FONT>
</P>
<P><FONT SIZE=3D2><-- test.map (the relevant bits!) --></FONT>
</P>
<P><FONT SIZE=3D2>QUERYMAP</FONT>
<BR><FONT SIZE=3D2> SIZE 300 300</FONT>
<BR><FONT SIZE=3D2> STATUS ON</FONT>
<BR><FONT SIZE=3D2> STYLE HILITE</FONT>
<BR><FONT SIZE=3D2> COLOR 255 0 0</FONT>
<BR><FONT SIZE=3D2>END</FONT>
</P>
<P><FONT SIZE=3D2>LAYER</FONT>
<BR><FONT SIZE=3D2> NAME "postcodes"</FONT>
<BR><FONT SIZE=3D2> TYPE POINT</FONT>
<BR><FONT SIZE=3D2> STATUS OFF</FONT>
<BR><FONT SIZE=3D2> DATA postcodes</FONT>
</P>
<P><FONT SIZE=3D2> TEMPLATE "query.html"</FONT>
<BR><FONT SIZE=3D2> FILTER "PCODE<>''"</FONT>
<BR><FONT SIZE=3D2> </FONT>
<BR><FONT SIZE=3D2> CLASS</FONT>
<BR><FONT SIZE=3D2> COLOR 192 192 192</FONT>
<BR><FONT SIZE=3D2> SYMBOL "circle"</FONT>
<BR><FONT SIZE=3D2> SIZE 3</FONT>
<BR><FONT SIZE=3D2> END</FONT>
<BR><FONT SIZE=3D2>END</FONT>
</P>
<P><FONT SIZE=3D2><-- end --></FONT>
</P>
<CODE><FONT SIZE=3D3><BR>
<BR>
**********************************************************************<BR>
The information contained in this email and any subsequent<BR>
correspondence is private and is intended solely for the <BR>
intended recipient(s). For those other than the intended<BR>
recipient(s) any disclosure, copying, distribution, or any <BR>
action taken or omitted to be taken in reliance on such <BR>
information is prohibited and may be unlawful.<BR>
**********************************************************************<BR>
</FONT></CODE>
</BODY>
</HTML>
------_=_NextPart_001_01C23948.C74EE460--