[mapserver-users] No filter defined on itemquery.

Ryan, Adam ARyan at co.linn.or.us
Tue Jun 11 09:33:27 PDT 2002


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 at erac.com]
Sent: Tuesday, June 11, 2002 7:17 AM
To: 'mapserver-users at 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

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


More information about the MapServer-users mailing list