contains() don't works

Ariel Dario ariel at FORWARDBUSINESS.COM.AR
Wed Apr 6 10:55:01 EDT 2005


Hello All

I need to know if a piont is in shape, I try to use shapeobj:contains() but
it allways rturns me MS_FALSE.
this is de code I made:

 $polyz = ms_newShapeObj(MS_SHAPE_POLYGON);
 $lineaz = ms_newLineObj();
 $pz = ms_newPointObj();
 $layerz = $map->getLayerByName("Zonas");
 $layerz->set('status', MS_ON);
 $lineaz->addXY(0,0);
 $lineaz->addXY(0,-10);
 $lineaz->addXY(-10,-10);
 $lineaz->addXY(-10,0);
 $lineaz->addXY(0,0);
 $polyz->add($lineaz);
 $pz->setXY(-1,-1);
 $polyz->draw($map, $layerz, $image, 0, "Zona");


   if ($polyz->contains($pz)!=MS_TRUE){
   $outzona=1;
   echo $outzona ;
     }
Please if someone can help me I'll appreciate it.
Thanks!!



More information about the mapserver-users mailing list