QueryByPoint in php mapscript - 0 results

cool frenz coolfrenz85 at YAHOO.COM
Tue Oct 16 15:31:56 EDT 2007


Hi,
I am trying to perform querybypoint but have been unable to get any result. 
The procedure that i am following:
1) Get clicked pixel points.
2) convert to georef coordinates. (Got them correct)
3) Querying the layer with this point.
4) Checking for results : Found none

Code Snippet:
$mypoint =ms_newPointObj();
    $mypoint->setXY(17.94031626 , 79.29237528); // To check i directly put a point though i tried with clicked point as well
    $check=@$map->queryByPoint($mypoint,MS_MULTIPLE, 20);
    $layer1=$map->getlayerbyname("cotton");
    if( $check == MS_SUCCESS)
      {
          $count_results = $layer1->getNumResults();
        print "NO = ".$count_results." ";
    }

Map file snippet:
CLASS
        NAME 'cotton'
      TEMPLATE "bogus.html"
      STYLE
           SYMBOL 'circle'
               SIZE 3
               COLOR 255 0 0
        END
    END
     PROJECTION
       "init=epsg:4326"
    END

Earlier i wasnt using any template then i used a dummy template (completely blank) to make it work but still it gave no result.

Please let me know where i am mistaken ?

I just want to know the coordinates of points nearby clicked point on map.(But first i should get some results!)

PS: I am using mysql as datasource.

Thanks and Regards,
Piyush Jain

       
---------------------------------
Pinpoint customers who are looking for what you sell. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20071016/dc2e0516/attachment.html


More information about the mapserver-users mailing list