On Sun, 2007-08-19 at 02:32 +0200, Didrik Pinte wrote: > I fill in the layer using php/mapscript with the following code : > > $shp = ms_newShapeObj(MS_SHAPE_LINE); > $pt = ms_newLineObj(); > $pt->addXY($point->x,$point->y); > $pt->addXY($point->x,$point->y); > $shp->add($pt); > $shp->classindex = 0; > $shp->set('text', $obj->get_id()); > $lyr->addFeature($shp);
The doubled labels where due to the fact that I created a MS_SHAPE_LINE with two points on a POINT LAYER... removing the second point solved the problem : $shp = ms_newShapeObj(MS_SHAPE_LINE); $pt = ms_newLineObj(); $pt->addXY($point->x,$point->y); $shp->add($pt); $shp->classindex = 0; $shp->set('text', $obj->get_id()); $lyr->addFeature($shp); Didrik
signature.asc
Description: This is a digitally signed message part