[mapserver-users] No filter defined on itemquery.

Martin, Daniel DMartin@erac.com
Tue, 11 Jun 2002 11:57:51 -0500


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.

------=_NextPartTM-000-f318ce1f-7d52-11d6-982f-00508bcfddcb
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C21169.1F1F79F0"

------_=_NextPart_001_01C21169.1F1F79F0
Content-Type: text/plain;
	charset="iso-8859-1"

Thanks for the quick reply.
 
Please forgive me, I'm fairly new at this.  I'm not clear on two things.  I
assume when you say "your item", the item is the DBASE item?  And second,
how can I set the FILTER in the mapfile to the value, when the value is to
be entered by the user?
 
Thanks again,
Dan

-----Original Message-----
From: Ryan, Adam [mailto:ARyan@co.linn.or.us]
Sent: Tuesday, June 11, 2002 11:33 AM
To: Martin, Daniel; 'mapserver-users@lists.gis.umn.edu'
Subject: RE: [mapserver-users] No filter defined on itemquery.


I struggled through the same thing.  The solution is to set the layer's
filter and filteritem to your value and item respectively, but I don't
understand why either.  Watch for punctuation.
 
Adam  

-----Original Message-----
From: Martin, Daniel [mailto:DMartin@erac.com]
Sent: Tuesday, June 11, 2002 7:17 AM
To: 'mapserver-users@lists.gis.umn.edu'
Subject: [mapserver-users] No filter defined on itemquery.


When I try to itemquery a Postal Code layer, I get:
msQueryByAttributes(): Query error. Requested layer has no filter defined. 
 
My URL looks like this:
http://myserver/cgi-bin/mapserv.exe?map=d%3A%5CMapServer%5CMAPFiles%5CMOMap.
map&program=%2Fcgi-bin%2Fmapserv.exe&map_web_imagepath=d%3A%5Cinetpub%5Cwwwr
oot%5Ctemp%5C&map_web_imageurl=%2Ftemp%2F&mode=itemquery&value=63105&qlayer=
Zip+Codes&item=ZIP&mapext=shapes
 
I've included the layer definition at the bottom of this email.  I don't
understand.  Why do I need a filter?  What filter do I need?  I've read
everything about this I could find before asking you, but the documentation
on FILTER is very brief, and the mail archives didn't provide a solution.  I
should point out that I'm using OGR MapInfo TAB data.
 
Thanks in advance,
Dan Martin
 
 
LAYER
  NAME "Zip Codes"
  PROJECTION
    "proj=latlong"
  END
 
  CONNECTIONTYPE OGR
  CONNECTION "\GISData\Namerca\USA\Usa_Maps\USZIPBdy.TAB"
 
  TYPE POLYGON
  STATUS OFF
 LABELITEM "ZIP"
  CLASS
    SYMBOL 'circle'
    SIZE 2
    NAME 'ZIP Code Boundaries'
    OUTLINECOLOR 50 50 50 
    COLOR -1 -1 -1
  LABEL
      POSITION cc
      TYPE TRUETYPE
      FONT arial_narrow
      MINSIZE 8
      MAXSIZE 12
      COLOR 0 0 0
      OUTLINECOLOR 255 255 255
      ANTIALIAS true
   END
  END
  TEMPLATE "..\queryTemplates\US_ZIP_Code_query.html"
END


------_=_NextPart_001_01C21169.1F1F79F0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 5.50.4613.1700" name=3DGENERATOR></HEAD>
<BODY>
<DIV><SPAN class=3D022225516-11062002><FONT face=3DArial =
color=3D#0000ff size=3D2>Thanks=20
for the quick reply.</FONT></SPAN></DIV>
<DIV><SPAN class=3D022225516-11062002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D022225516-11062002><FONT face=3DArial =
color=3D#0000ff size=3D2>Please=20
forgive me, I'm fairly new at this.&nbsp; I'm not clear on two =
things.&nbsp; I=20
assume when you say "your item",&nbsp;the item is&nbsp;the DBASE =
item?&nbsp; And=20
second, how can I set the FILTER in the mapfile to the value, when the =
value is=20
to be entered by the user?</FONT></SPAN></DIV>
<DIV><SPAN class=3D022225516-11062002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=3D022225516-11062002><FONT face=3DArial =
color=3D#0000ff size=3D2>Thanks=20
again,</FONT></SPAN></DIV>
<DIV><SPAN class=3D022225516-11062002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Dan</FONT></SPAN></DIV>
<BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
  <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
  size=3D2>-----Original Message-----<BR><B>From:</B> Ryan, Adam=20
  [mailto:ARyan@co.linn.or.us]<BR><B>Sent:</B> Tuesday, June 11, 2002 =
11:33=20
  AM<BR><B>To:</B> Martin, Daniel;=20
  'mapserver-users@lists.gis.umn.edu'<BR><B>Subject:</B> RE: =
[mapserver-users]=20
  No filter defined on itemquery.<BR><BR></FONT></DIV>
  <DIV><SPAN class=3D107034216-11062002><FONT face=3DArial =
color=3D#0000ff size=3D2>I=20
  struggled through the same thing.&nbsp; The solution is&nbsp;to set =
the=20
  layer's filter and filteritem&nbsp;to your&nbsp;value and item =
respectively,=20
  but I don't understand why either.&nbsp; Watch for=20
  punctuation.</FONT></SPAN></DIV>
  <DIV><SPAN class=3D107034216-11062002><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2></FONT></SPAN>&nbsp;</DIV>
  <DIV><SPAN class=3D107034216-11062002><FONT face=3DArial =
color=3D#0000ff=20
  size=3D2>Adam&nbsp; </FONT></SPAN></DIV>
  <BLOCKQUOTE dir=3Dltr style=3D"MARGIN-RIGHT: 0px">
    <DIV class=3DOutlookMessageHeader dir=3Dltr align=3Dleft><FONT =
face=3DTahoma=20
    size=3D2>-----Original Message-----<BR><B>From:</B> Martin, Daniel=20
    [mailto:DMartin@erac.com]<BR><B>Sent:</B> Tuesday, June 11, 2002 =
7:17=20
    AM<BR><B>To:</B> =
'mapserver-users@lists.gis.umn.edu'<BR><B>Subject:</B>=20
    [mapserver-users] No filter defined on =
itemquery.<BR><BR></FONT></DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2>When I try to=20
    itemquery a Postal Code layer, I get:</FONT></SPAN></DIV>
    <DIV><SPAN class=3D581251014-11062002>msQueryByAttributes(): Query =
error.=20
    Requested layer has no filter defined. </SPAN></DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial=20
    size=3D2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2>My URL looks=20
    like this:</FONT></SPAN></DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2><A=20
    =
href=3D"http://myserver/cgi-bin/mapserv.exe?map=3Dd%3A%5CMapServer%5CMAP=
Files%5CMOMap.map&amp;program=3D%2Fcgi-bin%2Fmapserv.exe&amp;map_web_ima=
gepath=3Dd%3A%5Cinetpub%5Cwwwroot%5Ctemp%5C&amp;map_web_imageurl=3D%2Fte=
mp%2F&amp;mode=3Ditemquery&amp;value=3D63105&amp;qlayer=3DZip+Codes&amp;=
item=3DZIP&amp;mapext=3Dshapes">http://myserver/cgi-bin/mapserv.exe?map=3D=
d%3A%5CMapServer%5CMAPFiles%5CMOMap.map&amp;program=3D%2Fcgi-bin%2Fmapse=
rv.exe&amp;map_web_imagepath=3Dd%3A%5Cinetpub%5Cwwwroot%5Ctemp%5C&amp;ma=
p_web_imageurl=3D%2Ftemp%2F&amp;mode=3Ditemquery&amp;value=3D63105&amp;q=
layer=3DZip+Codes&amp;item=3DZIP&amp;mapext=3Dshapes</A></FONT></SPAN></=
DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial=20
    size=3D2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2>I've included=20
    the layer definition at the bottom of this email.&nbsp; I don't=20
    understand.&nbsp; Why do I need a filter?&nbsp; What filter do I =
need?&nbsp;=20
    I've read everything about this I could find before asking you, but =
the=20
    documentation on FILTER is very brief, and the mail archives didn't =
provide=20
    a solution.&nbsp; I should point out that I'm using =
OGR&nbsp;MapInfo TAB=20
    data.</FONT></SPAN></DIV>
    <DIV><SPAN class=3D581251014-11062002></SPAN><SPAN=20
    class=3D581251014-11062002></SPAN><SPAN =
class=3D581251014-11062002></SPAN><SPAN=20
    class=3D581251014-11062002><FONT face=3DArial =
size=3D2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2>Thanks in=20
    advance,</FONT></SPAN></DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2>Dan=20
    Martin</FONT></SPAN></DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial=20
    size=3D2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial=20
    size=3D2></FONT></SPAN>&nbsp;</DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2>LAYER<BR>&nbsp;=20
    NAME "Zip Codes"<BR>&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp;=20
    "proj=3Dlatlong"<BR>&nbsp; END</FONT></SPAN></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2>&nbsp;=20
    CONNECTIONTYPE OGR<BR>&nbsp; CONNECTION=20
    "\GISData\Namerca\USA\Usa_Maps\USZIPBdy.TAB"</FONT></SPAN></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2>&nbsp; TYPE=20
    POLYGON<BR>&nbsp; STATUS OFF<BR>&nbsp;LABELITEM "ZIP"<BR>&nbsp;=20
    CLASS<BR>&nbsp;&nbsp;&nbsp; SYMBOL 'circle'<BR>&nbsp;&nbsp;&nbsp; =
SIZE=20
    2<BR>&nbsp;&nbsp;&nbsp; NAME 'ZIP Code =
Boundaries'<BR>&nbsp;&nbsp;&nbsp;=20
    OUTLINECOLOR 50 50 50 <BR>&nbsp;&nbsp;&nbsp; COLOR -1 -1=20
    -1<BR>&nbsp;&nbsp;LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION=20
    cc<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE=20
    TRUETYPE<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONT=20
    arial_narrow<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINSIZE=20
    8<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MAXSIZE=20
    12<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0=20
    0<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 255 255=20
    255<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANTIALIAS=20
    true<BR>&nbsp;&nbsp;&nbsp;END<BR>&nbsp; END<BR>&nbsp; TEMPLATE=20
    =
"..\queryTemplates\US_ZIP_Code_query.html"<BR>END</FONT></SPAN></DIV></B=
LOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------_=_NextPart_001_01C21169.1F1F79F0--

------=_NextPartTM-000-f318ce1f-7d52-11d6-982f-00508bcfddcb--