problem with trying to get Item Query to work.

Blammo bob.basques at CI.STPAUL.MN.US
Wed Sep 8 10:55:07 EDT 2004


All,

I can't seem to get Itemquery to work.

I'm trying to zoom to a polygon shape with a CGI call.

Help please.

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.

The problem request:

    map=global/view.map&layers=usstates_poly_utm+mncounty_poly_utm&qlayer=usstates_poly_utm&qitem=FIRST_NAME&qstring=Minnesota&mode=itemquery&mapext=shapes


The error:

    *msQueryByAttributes(): Query error. Requested layer has no
    templates defined. *

Sending a MAPEXT produces a map just fine.

    map=global/view.map&layers=usstates_poly_utm+mncounty_poly_utm&mode=map&mapext=-10019.0100+4767655.4506+874956.3291+5489960.3900


------------------------


The MapFile (partial):

 QUERYMAP
   STATUS ON
   STYLE SELECTED
 END

 LAYER
   NAME 'usstates_poly_utm'
   DATA '/var/www/map_data/usstates_poly_utm'
   TYPE POLYGON
   STATUS OFF # must explicitly turn this layer on
   CLASS
     COLOR 255 255 200
     OUTLINECOLOR 50 50 50
   END
 END

Partial data dump from dbfdump:

[map_data]#  dbfdump usstates_poly_utm.dbf
. . . .
22:Louisiana
23:Maine
24:Maryland
25:Massachusetts
26:Michigan
27:Minnesota
28:Mississippi
29:Missouri
30:Montana
31:Nebraska
32:Nevada
. . .

[map_data]# dbfdump --info usstates_poly_utm.dbf
Filename:       usstates_poly_utm.dbf
Version:        0x03 (ver. 3)
Num of records: 49
Header length:  97
Record length:  93
Last change:    2004/9/4
Num fields:     2
Field info:
Num     Name            Type    Len     Decimal
1.      STATE           C       2       0
2.      FIRST_NAME      C       90      0
[map_data]#




What am I doing wrong please?

bobb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20040908/1a87f04e/attachment.html


More information about the mapserver-users mailing list