ITEMQUERY problem

Jonathan Candy jonathancandy at hotmail.com
Fri Oct 20 16:03:56 EDT 2000


I recently started using MapServer and am really impressed by the 
functionality - an incredible job by Stephen Lime and others. I am using 
MapServer Version 3.3.011 under NT with IIS 4.0

I am working through the basics, can display,zoom,pan, have solved most 
problems looking the the doc and user mail archives but have run into 
trouble with ITEMQUERY. My query returns the correct field value, but not an 
image. I have not solved the problem using the doc. and user mail archives 
so I hope someone can point out my (simple) error.

I have two files: query3.map and query3.html

I enter:
http://142.232.148.68/scripts/mapserv.exe?map=c:\inetpub\wwwroot\bcit\query3.map&mode=map

and I get my map image correctly

I enter:
http://142.232.148.68/scripts/mapserv.exe?map=c:\inetpub\wwwroot\bcit\query3.map&mode=itemquery&item=code&value=SW5

and I get the Query text result correctly (so the query does work) but no 
map images.

Here is the query3.map file (I have made a simplified version for testing)
*****************
NAME QUERY3
EXTENT 499767 5454803 499928 5455434
SIZE 200 300
SHAPEPATH "d:\arcwork\bcitdata\"

WEB
IMAGEPATH "c:\inetpub\wwwroot\bcit\images\"
IMAGEURL "/bcit/images/"
END

LAYER
  NAME "bcitsw"
  DATA sw
  STATUS DEFAULT
  TYPE POLYGON
  CLASSITEM Code
  CLASS
    COLOR 255 0 0
    OUTLINECOLOR 0 0 0
  END
  QUERY
     TEMPLATE "c:\inetpub\wwwroot\bcit\query3.html"
  END
END
END
*************************
Here is the query3.html file (as simple as possible)
<html><body>
Query Result:
Building Name:</b> [CODE]<br><b>Type:</b> [TYPE]<br>

Images should appear below:<p>

<img src="[img]">
<img 
src="/scripts/mapserv.exe?map=[map]&item=Code&value=[value]&mode=itemquerymap&mapext=shapes">
</body></html>
****************************
So when I enter the command
http://142.232.148.68/scripts/mapserv.exe?map=c:\inetpub\wwwroot\bcit\query3.map&mode=itemquery&item=code&value=SW5

I get the query result but no images:  (My sw.dbf file does have a record 
with field code=SW5 and type=JON so the query works)
***********************
Query Result: Building Name: SW5
Type: JON
Images should appear below:
X    X
***********************
Here is the source of the HTML result file:
<!-- MapServer Version 3.3.011 -PROJ.4 -FreeType -TIFF -EPPL7 -->
<html><body>
Query Result:
Building Name:</b> SW5<br><b>Type:</b> JON<br>

Images should appear below:<p>

<img src="/bcit/images/QUERY3972060490443.gif">
<img

src="/scripts/mapserv.exe?map=c:\inetpub\wwwroot\bcit\query3.map&item=Code&value=SW5&mode=itemquerymap&mapext=shape

s">
</body></html>
*************************************************
The QUERY3972060490443.gif is not placed in the /bcit/images directory. 
However, tThe directory does get a .GIF file when I use the mode=map 
command.

All answers really appreciated.
regards,

Jonathan Candy
BCIT GIS Department
e-mail:  jcandy at bcit.ca
Tel:  604-432-8378.
www.gis.bcit.ca
_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.




More information about the mapserver-users mailing list