Re [SOLVED] : [UMN_MAPSERVER-USERS] doubled labels
Didrik Pinte
dpinte at ITAE.BE
Wed Aug 29 07:12:50 PDT 2007
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20070829/47f2d969/attachment.sig>
More information about the MapServer-users
mailing list