Personal tools
You are here: Home Documentation FAQs msQueryByPoint: search returned no results

msQueryByPoint: search returned no results

Document Actions
Up to table of contents
Why do I get the message "msQueryByPoint(): Search returned no results. No matching record(s) found" when I query a feature known to exists?

The query feature requires a TEMPLATE object in the CLASS object of your LAYER definition. The value points to a html fragment using MapServer template syntax.

Example MapFile fragment:

LAYER
  NAME Parcel9
  TYPE POLYGON
  STATUS OFF
  DATA Parcels/area09_parcels
  CLASS
    STYLE
      OUTLINECOLOR 128 128 128
      COLOR 153 205 255
    END
    TEMPLATE "templates/Parcels/area09_parcels.html"
  END

  HEADER "templates/Parcels/area09_parcels_header.html"
  FOOTER "templates/Parcels/area09_parcels_footer.html"

END

Example Template:

<tr>
  <td>[lrn]</td>
  <td>[PIN]</td>
</tr>

The [lrn] is a special keyword that indicates the resulting line number which starts at 1. [PIN] is the name of a feature attribute.

This FAQ applies to: MapServer 4.6, MapServer 4.8

by Bart van den Eijnden last modified 2005-12-13 08:35
Contributors: Philip Mark Donaghy

queries

Posted by John Churchill at 2007-03-09 20:57
Is there a way to handle this error. The error message isn't very useful to an end user. I'd rather return something like ... "There are no clickable map features on the part of the map that you clicked on". I've written my templates and the application works well so I'm hoping to handle this error for the case where the user simply misses the point, line or polygon that they aimed for.

Powered by Plone