[Mapserver-users] Query By Point Help

Eric Katherman vaiod at berloy.com
Mon Jun 14 13:38:26 PDT 2004


I am missing something when doing querys using PHP... Could someone look and 
see what I might be missing... I am using the following...

(Most code taken from the phpgis demo)

$queryObj = $map->queryByPoint( $ptClicked,MS_SINGLE,0 );

ptClicked returns the X/Y/M points

I then echo out queryObj and get either 1 or 0 although I am not sure why it 
seems random. ???

$oLayer = $map->GetLayer(2);
$numResults = $oLayer->getNumResults();
echo ("<br>results: ".$numResults);

According to the docs, getNumResults returns any results from the query on the 
previous layer. This returns 0, I was getting it to return 1 at some point 
but haven't been able to get it back since then.  The layer I want to query 
is number 2, what am I missing here.  I am able to get the data out when 
using the basic html tools but have had no luck with the php side.  Please 
help...




More information about the MapServer-users mailing list