[mapserver-users] QueryUsingPoint

Daniel Morissette morissette at dmsolutions.ca
Tue Jul 24 14:09:36 EDT 2001


Hossam Abdel Sayed wrote:
> 
> I'm using PHP/Mapscript and Mapserver 3.4. I'm trting to use
> "queryUsingPoint" as below:
> 
>      $QueryResults = $newmapObj->queryUsingPoint($ptClicked,MS_MULTIPLE,
> -1);
>      print $QueryResults;
> 
> The second line prints "0", which means there's no results. I have queryitem
> and query object in each layer in my mapfile and I made sure that the point
> is passed in map units
> 
> Any idea why I don't get any results from the query ???
> 

Hossam,

What you do seems right... here are a few things to check/try:

1- Set a TEMPLATE value in your query objects... I'm not sure if it's
required, but set the value just in case.

2- Make sure your layer's STATUS is ON

3- Try increasing the tolerance value

4- If all the above fail, then check your shapefile manually (using
ArcView, or another utility) to verify that the coordinates you use for
the query are close enough to some queriable shapes in your file.

-- 
------------------------------------------------------------
 Daniel Morissette               morissette at dmsolutions.ca
 DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------
  Don't put for tomorrow what you can do today, because if 
      you enjoy it today you can do it again tomorrow.



More information about the mapserver-users mailing list