[Mapserver-users] Querying a single layer

Stephen Woodbridge woodbri at swoodbridge.com
Tue Jun 22 12:00:11 PDT 2004


Chris Helm wrote:

> Im having problems with the ability to query a layer
> of polygons in mapserver 4.2.  The layer is fully
> attributed and I have created a query template, placed
> it in what I believe to be its respective place in the
> mapfile, but when I try to query the layer in my
> application I get an error saying "Search Returned No
> Results: no matching records found."  
> 
> If anyone could give me a review of the basic concepts
> of how mapserver reads the query templates, and how to
> get them working, I would be very thankful.

Does the layer have a TEMPLATE "dummy" or some real template?

Here is simple query only layer definition I use. I have not tried this 
on 4.2 yet:

   LAYER
     NAME "states"
     TYPE QUERY
     STATUS ON
     DATA "us/st99_d00"
     TOLERANCE 50
     TOLERANCEUNITS FEET
     CLASS
       TEMPLATE "dummy"
     END
     METADATA
       "DESCRIPTION"    "States"
       "RESULT_FIELDS"  "NAME"
     END
   END

-Steve W.




More information about the MapServer-users mailing list