[ka-Map-users] mapserver query system in kamap
Alessio Di Lorenzo
alessio.dilorenzo at gmail.com
Sat Sep 29 09:20:36 EDT 2007
Hi list,
I have a problem with the query system.
I followed the wiki page at
http://ka-map.ominiverdi.org/wiki/index.php/Query (Using MapServer's
Templating System for Queries).
Firstly I created the html template as specified in the wiki
<html>
<head><title>Sample Template</title></head>
<body>
<li> item 1 is [MY_ITEM_1]
<li> and item 2 is [MY_ITEM_2]
<li> but item 3 is [MY_ITEM_3]
</body>
</html>
(using only a few items... for now it is a demo...)
Then I worked on my mapfile adding the required keywords
MAP
...
...
LAYER
...
...
METADATA
...
'queryable' 'true'
...
END #metadata
CLASS
...
...
TEMPLATE '/absolute/path/to/mytemplate.html'
...
END #class
END #layer
END #map
Finally I customized the startUp.js file changing the myQuery function
like the following
function myQuery( eventID, queryType, coords ) {
window.open("/cgi-bin/mapserv?map=/absolute/path/to/my/mapfile.map&mode=query&mapxy=" + coords[0] + "+" + coords[1]);
}
The problem, now, is that I ALWAYS get the Error
msQueryByPoint(): Search returned no results. No matching record(s) found.
but I'm quite sure that I center the queriable element with the mouse (I
inserted also the TOLERANCE and TOLERANCEUNIT keywords in my mapfile,
but nothing changed)...
Can you help me guys?
It's very important for me! Please...
More information about the ka-Map-users
mailing list