queryByRect
N Zhou
zhou_naijun at HOTMAIL.COM
Thu Oct 28 12:26:45 PDT 2004
Hi,
I'm sorry if this message is sent twice because I had a network connection
problem.
I have a question of queryByRect and getting query results. My php script is
like:
$ms = ms_newMapObj($map);
$aRect = ms_newRectObj();
$aRect->setextent(minx, miny, maxx, maxy);//the extent of georeference
$selectLayer = $ms->getLayerByName(layer_name);
$q_success = $selectLayer->queryByRect($aRect);
if ($q_success == MS_SUCCESS) {
$numResult = $selectedLayer->getNumResults();
$results = $selectLayer->getResult(0);//get the first query result
}
The queryByRect is success. But I got an error message of the
getNumResults():
Fatal error: Call to a member function on a non-object in myscript.php
on line 26
Does anyone knows why? Is that because an error in the mapfile, or
Thanks a lot!
Naijun
More information about the MapServer-users
mailing list