queryByRect?
    N Zhou 
    zhou_naijun at HOTMAIL.COM
       
    Thu Oct 28 12:24:16 PDT 2004
    
    
  
Hi,
I'm new to the mapserver. 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