[Mapserver-users] item query with v3.7/4.0

Liz Godwin godwinl at agr.gc.ca
Thu Jun 19 14:37:21 EDT 2003


Hello,

I'm using Mapserver 3/7/4.0 and attempting to display the results of an item query.  I'm using the CGI version, and sending the request via the URL.  The result is that the first record in the table is selected and zoomed into, not the record queryied for.

The data is a polygon shapefile.  The URL string is:
http://hostname/cgi-bin/mapserv?mode=itemquery&qlayer=mapsheet&qitem=SHEET&qstring=31f&mapext=shapes

In the map file, the layer is set up like this, however I have also triied removing the filter and filteritem elements:
LAYER
  NAME "mapsheet"
  TYPE polygon
  STATUS DEFAULT
  DATA "cliiwms"
  TEMPLATE cli.html
  FILTERITEM "SHEET"
  FILTER "%sheetno%" 
  CLASSITEM 'cli_ag'
  CLASS
    NAME mapsheet
    COLOR 220 219 190
    OUTLINECOLOR 156 156 156
  END #CLASS
  PROJECTION
    "init=epsg:42304"
  END
END #LAYER

I cannot figure out why this is not working well, plus I'd also like clarification on FILTERITEM and FILTER in the map file.  Are they needed or not needed for queries?  

Thanks for your help,


Liz Godwin

Canadian Soil Information System (CanSIS),
Research Branch, Agriculture and Agri-Food Canada






More information about the mapserver-users mailing list