[Mapserver-users] Questions about queryByPoint and queryByRectangle for PHP/MapScript

Rene Teniere TENIERER at gov.ns.ca
Mon Mar 22 09:35:03 PST 2004


Hi all,

I've spent 2 days researching how to perform a simple info style query
for the features in my site. I have looked at all the literature on the
lists and am still confused. I have this down:

    $queryRect = ms_newRectObj();
   
$queryRect->setExtent($queryMinX,$queryMinY,$queryMaxX,$queryMaxY);
    @$map->queryByRect($queryRect);

and

    $queryPoint = ms_newPointObj();
    $queryPoint->setXY($myQueryX,myQueryY);
    @$map->queryByPoint($queryPoint,MS_MULTIPLE,-1);

but what am I supposed to do after that? Should I be doing this to the
layer object instead? I know that MS_SUCCESS or MS_FAILIURE is returned
and I can use a logic loop to go from there. Do I have to open the
database and manually pull out the info for each item? If so, how do I
get the index?

You can see my problem, I find this all very confusing. Please help if
you can.

Thanks,
Rene




More information about the MapServer-users mailing list