[mapserver-users] No filter defined on itemquery.

Martin, Daniel DMartin@erac.com
Tue, 11 Jun 2002 09:16:45 -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-9a2fffcc-7d41-11d6-bb02-00508bcfdcc7
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C21152.9E3B44B0"

------_=_NextPart_001_01C21152.9E3B44B0
Content-Type: text/plain;
	charset="iso-8859-1"

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_01C21152.9E3B44B0
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=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 like=20
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 the=20
layer definition at the bottom of this email.&nbsp; I don't =
understand.&nbsp;=20
Why do I need a filter?&nbsp; What filter do I need?&nbsp; I've read =
everything=20
about this I could find before asking you, but the documentation on =
FILTER is=20
very brief, and the mail archives didn't provide a solution.&nbsp; I =
should=20
point out that I'm using OGR&nbsp;MapInfo TAB 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; NAME=20
"Zip Codes"<BR>&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp; =
"proj=3Dlatlong"<BR>&nbsp;=20
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 =
12<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
COLOR 0 0 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=
ODY></HTML>

------_=_NextPart_001_01C21152.9E3B44B0--

------=_NextPartTM-000-9a2fffcc-7d41-11d6-bb02-00508bcfdcc7--