[Mapserver-users] itemquery

randy james rjames57 at yahoo.com
Mon Mar 3 17:53:11 EST 2003


Hi

I have been trying to figure out itemquery, without
results yet. I would like to show the attribute
information and a map that shows the polygon in the
template output. I am missing something important i'm
sure. So far i have a search.html which contains:

<!--  search form -->
<form method="get"
action="http://mapserver.ltc/cgi-bin/mapserv";>
<input type="hidden" name="map"
value="/var/www/html/gis/maps/territory_proj.map">
<input type="hidden" name="mode" value="itemnquery">
<input type="hidden" name="qlayer" value="l_fc">
<input type="hidden" name="item" value="MAPSTAND">
<input type="TEXT" size="30" name="value" value="">
<input type="submit" value="Search">
</form>
<!-- /search form -->
<input type="hidden" name="imgext" value="[mapext]">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="mapext" value="shapes">

A template file that contains all the database items

<table cellpadding=5 cellspacing=2 border=0>
<tr bgcolor=#CCCCCC>
       <td>[Mapstand]</td><td>[Opening
Number]</td><td>[Planted spe]....

The portion of the map file for the layer

  # 7 layer {Forest Cover}
  layer
    data "l_fc"
    footer "l_fc_footer.html"
    header "l_fc_header.html"
    labelitem "SPECIES1"
       template l_fc.html
    labelmaxscale 200000
    labelminscale 60
#   labelsizeitem "2"
    name "l_fc"
    status off
    type polygon
# transparency 50
#  filteritem "MAPSTAND"
#   1 class #none
 CLASS
    name 'Forest Cover'
#     color 0 0 0
         OUTLINECOLOR 168 0 255
  LABEL
        TYPE truetype
       FONT arial
        SIZE 6
       COLOR 0 0 0
        ANTIALIAS TRUE
         END
        END

The url seems to be right to me:

http://mapserver.ltc/cgi-bin/mapserv?map=%2Fvar%2Fwww%2Fhtml%2Fgis%2Fmaps%2Fterritory_proj.map&mode=itemnquery&qlayer=l_fc&item=MAPSTAND&value=test

This gives the error:

msQueryByAttributes(): Query error. No query
expression defined. 

Anyone still reading, and can help? ;-)

Cheers
Randy


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



More information about the mapserver-users mailing list