FAQs
View entire FAQ in full Up to table of contentsFrequently Asked Questions.
Error Messages
msQueryByPoint: search returned no results
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
Where is the mapserver log file?
How can I tell mapserv where to put a log file so that I can diagnose problems?
Answer:
See: Neapolis Reference
regarding LOG feature inside WEB section of .map file. See also EMPTY and ERROR features.
WEB Object ...(snip) .. EMPTY optional URL to forward users to if a query fails. If not defined the value for ERROR is used. Value: [url] ERROR optional, however highly suggested! URL to forward users to if an error occurs. Ugly old MapServer error messages will appear if this is not defined. Values: [url] LOG optional File to log MapServer activity in. Must be writable by the user the web server is running as. Value: [filename]