[Mapserver-users] itemquery problem -- I'm pulling my hair out.
Mac Birch
mac at mbirch.com
Wed Nov 19 10:51:39 PST 2003
Has anyone had any success using itemquery with MS 4.0 with IIS on
XP-Professional?
My map file extents have been carefully defined to include a box
that is much, much larger than the theme coverage I'm searching.
All other aspects of the system work, but I still am getting the
dreaded "Search returned no results. No matching record(s) found,
layer and area of interest do not overlap." message.
Here's the .map file I'm using:
#
# Start of map file
#
NAME TESTQuery
STATUS ON
SIZE 480 520
EXTENT 1300000 1443024 4126986 -682424
SHAPEPATH "c:\myApplicationPath\buckscounty\GIS\data"
OUTPUTFORMAT
NAME png
DRIVER "GD/PNG"
MIMETYPE "image/png"
IMAGEMODE RGBA
EXTENSION "png"
END
#
# Start of web interface definition
#
WEB
#EMPTY ../../buckscounty/gis/RecNotFound.htm
TEMPLATE queryResult.htm
IMAGEPATH "e:\myimagepath\buckscounty\tmp\"
# LOG "testQuery.log"
END
QUERYMAP
STATUS ON
STYLE HILITE
COLOR 255 255 0
END
LAYER
NAME boundaries
DATA townBoundaries
STATUS DEFAULT
TYPE polygon
TEMPLATE queryResult.htm
CLASS
COLOR 212 212 212
OUTLINECOLOR 0 0 0
END
END
END # Map File
Here's the essence of the form I'm submitting:
<form action="http://www.mydomain.com/gis/mapserver40-
png/mapserv.exe" method="get">
<input type="hidden" name="map"
value="../../mapPath/buckscounty/gis/testQuery.map">
<input type="hidden" name="mode" value="itemquery">
<input type="hidden" name="savequery" value="true">
<input type="hidden" name="qlayer" value="boundaries">
<input type="hidden" name="qitem" value="Name">
<input type="hidden" name="mapext" value="shapes">
<input type="submit" value="Submit Query">
<input name="qstring" size="45">
</form>
I have tried submitting just about every possible combination of
qstring options I can think of. for example,
([Name] EQ 'Doylestown')
([Name] EQ "Doylestown")
('[Name]' IN 'Doylestown')
([Name] = 'Doylestown')
([Name] = "Doylestown")
('[Name]' EQ "Doylestown")
('[Name]' EQ 'Doylestown')
('[Name]' EQ Doylestown) -- Yikes!!
etc. (I think you get the picture)
Upper/lower cases of the "Name" variable and "Doylestown" are
identical to those that appear in the shapefile.dbf table
It appears that MS is simply not finding the requested variable in
the qstring, so I even tried submitting strings that would always
evaluate to TRUE, such as
(1 EQ 1)
(1 = 1)
(2 GE 1)
(2 <= 1)
([Name] EQ [Name] etc.
Still, the same result.
Where have I gone wrong? Please share your success stories.
Much Appreciated
--Mac--
More information about the MapServer-users
mailing list