<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body>
All,<br>
<br>
I can't seem to get Itemquery to work.<br>
<br>
I'm trying to zoom to a polygon shape with a CGI call.<br>
<br>
Help please.
<br>
<br>
Just trying to zoom to a "Minnesota" polygon from a US map based on an
attribute (with no template, all in the Map file. From what I've read
this should be possible). Am I mistaken I've tried all kinds of
permutations. A sample of the required components would help out I
think.<br>
<br>
The problem request:<br>
<blockquote><span class="moz-txt-link-freetext">map=global/view.map&layers=usstates_poly_utm+mncounty_poly_utm&qlayer=usstates_poly_utm&qitem=FIRST_NAME&qstring=Minnesota&mode=itemquery&mapext=shapes</span>
<br>
</blockquote>
The error:<br>
<blockquote><b>msQueryByAttributes(): Query error. Requested layer has
no templates defined. </b><br>
</blockquote>
Sending a MAPEXT produces a map just fine.<br>
<blockquote>map=global/view.map&layers=usstates_poly_utm+mncounty_poly_utm&mode=map&mapext=-10019.0100+4767655.4506+874956.3291+5489960.3900<br>
</blockquote>
<br>
------------------------<br>
<br>
<br>
The MapFile (partial):
<br>
<br>
QUERYMAP
<br>
STATUS ON
<br>
STYLE SELECTED
<br>
END
<br>
<br>
LAYER
<br>
NAME 'usstates_poly_utm'
<br>
DATA '/var/www/map_data/usstates_poly_utm'
<br>
TYPE POLYGON
<br>
STATUS OFF # must explicitly turn this layer on
<br>
CLASS
<br>
COLOR 255 255 200
<br>
OUTLINECOLOR 50 50 50
<br>
END
<br>
END
<br>
<br>
Partial data dump from dbfdump:
<br>
<br>
[map_data]# dbfdump usstates_poly_utm.dbf
<br>
. . . .
<br>
22:Louisiana
<br>
23:Maine
<br>
24:Maryland
<br>
25:Massachusetts
<br>
26:Michigan
<br>
27:Minnesota
<br>
28:Mississippi
<br>
29:Missouri
<br>
30:Montana
<br>
31:Nebraska
<br>
32:Nevada
<br>
. . .
<br>
<br>
<tt>[map_data]# dbfdump --info usstates_poly_utm.dbf
<br>
Filename: usstates_poly_utm.dbf
<br>
Version: 0x03 (ver. 3)
<br>
Num of records: 49
<br>
Header length: 97
<br>
Record length: 93
<br>
Last change: 2004/9/4
<br>
Num fields: 2
<br>
Field info:
<br>
Num Name Type Len Decimal
<br>
1. STATE C 2 0
<br>
2. FIRST_NAME C 90 0
<br>
[map_data]#
<br>
</tt><br>
<br>
<br>
<br>
What am I doing wrong please?
<br>
<br>
bobb<br>
</body>
</html>