Improvement to query error message, FAQ

Bart van den Eijnden BEN at SYNCERA-ITSOLUTIONS.NL
Tue Nov 29 06:56:23 EST 2005

Hi Philip,

the good thing about the new website is that you can add content yourself after you have registered, although it needs to be approved by the document owner.

I have just added the FAQ for you at: 

After it is approved it will become visible.

Best regards,

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT 015-7512436
email: BEN at

>>> Philip Mark Donaghy <philip.donaghy at GMAIL.COM> 11/29/2005 11:46:38 AM >>>
I've just started reusing MapServer. It's been a while. I just wanted
to make a comment about this error message. "msQueryByPoint(): Search
returned no results. No matching record(s) found". I am using the and MapServer 4.6.1.

I created some new layers for a project that I have. And I couldn't
figure out why the default query function did not work.

I simply didn't know that a TEMPLATE object was required in the CLASS
object. This is vaguely aswered by a FAQ. My contribution would be to
add another FAQ.

Q. Why do I get the message "msQueryByPoint(): Search returned no
results. No matching record(s) found" when I query a feature known to

A. 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:

    NAME Parcel9
    DATA Parcels/area09_parcels
        OUTLINECOLOR 128 128 128
        COLOR 153 205 255
      TEMPLATE "templates/Parcels/area09_parcels.html"

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


Example Template:


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

Philip Donaghy
Philip Donaghy
Skype: philipmarkdonaghy
Office: +33 5 56 60 88 02
Mobile: +33 6 20 83 22 62

More information about the mapserver-dev mailing list