[Mapserver-users] mapserver 4.0 : queryByRect problem

Map Surfers map_surfer at yahoo.com
Mon Oct 6 15:24:22 EDT 2003


fx-
try remming out  $oShape->free(); just to see what
happens. you may want to post your mapfile, it may
help to answer your question.
Damian
--- fx gamoy <fx.gamoy at mapxplore.com> wrote:
> hello,
> i ve got a problem with the querybyrect method with
> mapserv4.0
> 
> for ($i=0;$i<$nblayer;$i++)
> {
> $oLayer = $oMap->getLayer( $i );
>           if (@$oLayer->queryByRect($oRect) ==
> MS_SUCCESS)
>     {
> $oLayer->open();
> 
>      $szResults=$oLayer->getNumResults();
>      if ( $szResults > 0)  //i find 14 shapes
>      {
>            for ($j=0;$j<$szResults;$j++)
>           {
>            $oResults=$oLayer->getResult($j);
>           
>
$oShape=$oLayer->getShape($oResults->tileindex,$oResults->shapeindex);
>            $oShape->free();
>           }
>      }// if ( $szResults >0
>      $oLayer->close();
>     } //if (@$oLayer->quer 
> }// for
> i find 14 shapes but the getshape method crash
> PHP Fatal error:  [MapServer Error]:
> msOGRLayerNextShape(): Assertion failed: OGR layer
> not opened!!!
> Any idea?
> thanks 
> fx
> 


__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com



More information about the mapserver-users mailing list