[mapserver-users] php queryByPoint

Aaron Hunt hunt at zedxinc.com
Fri Sep 7 14:51:36 EDT 2001


I am trying to use php mapscript to query a map file using queryByPoint and all I ever get is
"Warning: MapServer Error in msQueryByPoint(): No matching record(s) found. " 
Can anyone help me, or direct me to some examples, with querying and displaying the results.

The code I am using is below where $filename and $pointshape are the names of the shape files used and $minx, $miny, $maxx, $maxy is the extent passed in..

Thank you for any help
Aaron

<?php
dl("php_mapscript.so");

$point = ms_newPointObj();
$point->setxy($lon,$lat);

$map = ms_newMapObj("phpsoil.map");
$map->setExtent($minx, $miny, $maxx, $maxy);
$layer = $map->getlayerbyname(field);
$layer->set("data","$filename");
$layer2 = $map->getlayerbyname(datap);
$layer2->set("data","$pointshape");



$map->queryByPoint($point,MS_MULTIPLE,-1);

?>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20010907/52ab6c91/attachment.html


More information about the mapserver-users mailing list