[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> </DIV>
<DIV><SPAN class=3D022225516-11062002><FONT face=3DArial =
color=3D#0000ff size=3D2>Please=20
forgive me, I'm fairly new at this. I'm not clear on two =
things. I=20
assume when you say "your item", the item is the DBASE =
item? 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> </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. The solution is to set =
the=20
layer's filter and filteritem to your value and item =
respectively,=20
but I don't understand why either. Watch for=20
punctuation.</FONT></SPAN></DIV>
<DIV><SPAN class=3D107034216-11062002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D107034216-11062002><FONT face=3DArial =
color=3D#0000ff=20
size=3D2>Adam </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> </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&program=3D%2Fcgi-bin%2Fmapserv.exe&map_web_ima=
gepath=3Dd%3A%5Cinetpub%5Cwwwroot%5Ctemp%5C&map_web_imageurl=3D%2Fte=
mp%2F&mode=3Ditemquery&value=3D63105&qlayer=3DZip+Codes&=
item=3DZIP&mapext=3Dshapes">http://myserver/cgi-bin/mapserv.exe?map=3D=
d%3A%5CMapServer%5CMAPFiles%5CMOMap.map&program=3D%2Fcgi-bin%2Fmapse=
rv.exe&map_web_imagepath=3Dd%3A%5Cinetpub%5Cwwwroot%5Ctemp%5C&ma=
p_web_imageurl=3D%2Ftemp%2F&mode=3Ditemquery&value=3D63105&q=
layer=3DZip+Codes&item=3DZIP&mapext=3Dshapes</A></FONT></SPAN></=
DIV>
<DIV><SPAN class=3D581251014-11062002><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2>I've included=20
the layer definition at the bottom of this email. I don't=20
understand. Why do I need a filter? What filter do I =
need? =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. I should point out that I'm using =
OGR 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> </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> </DIV>
<DIV><SPAN class=3D581251014-11062002><FONT face=3DArial=20
size=3D2></FONT></SPAN> </DIV>
<DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2>LAYER<BR> =20
NAME "Zip Codes"<BR> PROJECTION<BR> =20
"proj=3Dlatlong"<BR> END</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2> =20
CONNECTIONTYPE OGR<BR> CONNECTION=20
"\GISData\Namerca\USA\Usa_Maps\USZIPBdy.TAB"</FONT></SPAN></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><SPAN class=3D581251014-11062002><FONT face=3DArial =
size=3D2> TYPE=20
POLYGON<BR> STATUS OFF<BR> LABELITEM "ZIP"<BR> =20
CLASS<BR> SYMBOL 'circle'<BR> =
SIZE=20
2<BR> NAME 'ZIP Code =
Boundaries'<BR> =20
OUTLINECOLOR 50 50 50 <BR> COLOR -1 -1=20
-1<BR> LABEL<BR> POSITION=20
cc<BR> TYPE=20
TRUETYPE<BR> FONT=20
arial_narrow<BR> MINSIZE=20
8<BR> MAXSIZE=20
12<BR> COLOR 0 0=20
0<BR> OUTLINECOLOR 255 255=20
255<BR> ANTIALIAS=20
true<BR> END<BR> END<BR> 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--