[Mapserver-users] Testsuite - itemquery problems

Steve McCrone mccrone at pc.jaring.my
Tue Jan 14 19:32:08 PST 2003


Hi again,

What I thought would be a simple task has once again caused me problems.
I'm sure its just a silly mistake but I can't seem to find it.

I am duplicating what the itemquery case1 sample does. However, the first
map
is generated, but the second, "zoomed in" is not. It finds the data no
problem
but the image does not get generated and dumped into the image directory
/tmp
To assist here is the relevant parts -

Index.html
=======
<html>
<head>
<title>MapServer 3.5 Tutorial</title>
</head>
<body bgcolor="#ffffff">
<form method=GET action="/cgi-bin/mapserv.exe">

<input type="hidden" name="map" value="C:\Inetpub\wwwroot\case1.map">

<input type="hidden" name="mode" value="itemquery">
<input type="hidden" name="qlayer" value="county">
<input type="hidden" name="item" value="cty_name">

<input type="hidden" name="program" value="/cgi-bin/mapserv.exe">
<input type="hidden" name="map_web_imagepath"
value="C:\inetpub\wwwroot\tmp\">
<input type="hidden" name="map_web_imageurl" value="/tmp/">

Pick one:
<select name="value" size="1">
<option>  Aitkin
<option>  Anoka
<option>  Becker
<option>  Cook

</select>
<input type="submit" value="Go!">

</form>
</body>
</html>

map file
======
MAP
  NAME case1
  SHAPEPATH "Data"
  SIZE 300 300
  EXTENT 74000 4775000 798000 5499000

  WEB
    IMAGEPATH "set in index.html"
    IMAGEURL "set in index.html"
  END

  QUERYMAP
    STATUS ON
    STYLE HILITE
    COLOR 255 255 0
  END

  LAYER
    NAME county
    DATA county
    STATUS ON
    TYPE POLYGON
    FILTERITEM cty_name
   FILTER "%value%"
   CLASS
      COLOR 212 212 212
      OUTLINECOLOR 0 0 0
      TEMPLATE case1_template.html
   END
  END
END

Template file
=========
<html>
<head>
  <title>ItemQuery Example</title>
</head>
<body bgcolor="#ffffff">
<font size="+2" face="arial,helvetica"><b>Case 1: Simple
ItemQuery</b></font>
<p>
Dump of attributes from that county:
<p>
<b>Name:</b> [CTY_NAME]<br>
<b>ID Number:</b> [COUN]<br>
<b>Abbreviation Code:</b> [CTY_ABBR]<br>
<p>
and here's the map of the query results (you can zoom to a set of results as
well):
<p>
<table cellpadding="5">
<tr>
<td><img border="2" src="[img]" height="300" width="300"></td>
<td><img border="2"
src="[program]?map=[map]&name=[value]&mode=itemquerymap&mapext=shapes&qlayer
=[qlayer]" height="300" width="300"></td>
</tr>
</table>
</body>
</html>





More information about the MapServer-users mailing list