[Mapserver-users] mapscript - queryByPoint help, simple Q

poff poff at sixbit.org
Thu Aug 28 03:54:37 EDT 2003


Hello again,

I'm having problems getting any results with queryByPoint.

Basically I draw my map as usual then I try the following on the drawn   
layer:
  
        $my_point = ms_newpointObj();

        $my_point->setXY($_REQUEST["mapa_x"],$_REQUEST["mapa_y"]);

        $result=$uLayer->queryByPoint ($my_point,MS_SINGLE,-20);
  
I tried different buffers, zooming in etc. but I always get: "No matching 
Record(s) found"

The layer is drawn OK, and is simple as far as the mapfile goes (nothing 
apart from):

...
STATUS ON
TYPE POINT
LABELCACHE FALSE

CLASS
	SYMBOL
END

END
...

The points are drawn in from a database, so if I could convert the 
$_REQUEST clicks into lat/lon I could just query the database instead of 
mapserver.

Has anyone got any light to shed on this? I'd be most grateful if someone 
could show me what I'm doing wrong, or suggest how to get the lat/long 
values. The archives didn't seem to have anyone in my situation - which 
suggested to me I'm missing something basic out.

Thanks in advance,
 
-- 
poff at sixbit.org 
SDF Public Access UNIX System - http://sdf.lonestar.org

Please do not carbon copy replies to me



More information about the mapserver-users mailing list