[Mapserver-users] itemquery problem -- I'm pulling my hair out.

Richard Greenwood Rich at GreenwoodMap.com
Thu Nov 20 08:46:12 EST 2003


At 02:50 PM 11/19/2003, you wrote:
>I'm having the same problems with the 4.0 UMN Windows binaries.  The
>itemquery never, ever, ever works - no matter what you do.  These same
>queries worked fine on 3.6.  I, like you, have tried an incredible
>variety of expressions, and never does MS find an item.  I'm extremely
>frustrated.
>
>I asked the list similar questions about a month ago.  I was told to
>read regex documentation, but no matter what I try the result is the
>same.  I even asked the list if anyone had been able to get itemquery
>working on these specific UMN 4.0 Windows binaries, but got no
>responses.
>
>I am beginning to think itemqueries just do not work with the 4.0
>Windows UMN binaries.

Sorry, I'm coming into this thread a little late, but for the record 
itemquery on 4.0
Windows UMN binaries works fine for me. Remember that the syntax for 
defining your query has changed from 3.6 to 4.0. You need to define the 
qitem and qstring in 4.0 (and the qlayer, same as 3.6).

The <input name="qstring" size="45"> looks suspicious to me. In the URI are 
you seeing qstring=XXX, where XXX is the desired value? I would expect it 
to look more like <input type=text name="qstring">

Rich


>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--
>
>
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
>_______________________________________________
>Mapserver-users mailing list
>Mapserver-users at lists.gis.umn.edu
>http://lists.gis.umn.edu/mailman/listinfo/mapserver-users


Richard W. Greenwood, PLS
Greenwood Mapping, Inc.
Rich <at> GreenwoodMap <dot> com
(307) 733-0203
http://www.GreenwoodMap.com  




More information about the mapserver-users mailing list