[mapserver-users] How to set Labels dynamically?
Helen Eskina
heskina at ubitech.com
Thu Dec 3 08:13:10 PST 2009
Hello,
I couldn’t find documentation how to set the text labels dynamically using
MapScript.
My application should show points with labels on the map. Points and labels
are obtained dynamically from the database or some text file.
I add the points to the layer and draw layer as following:
$my_point = ms_newpointObj();
$my_point->setXY(-75.895, 45.9227);
$my_point->project($projInObj,$projOutObj);
$line = ms_newLineObj();
$line->add($my_point);
$shape = ms_newShapeObj(MS_SHAPE_POINT);
$shape->add($line);
$shape->set(text, 'new point');
$daLayer->addFeature($shape);
$image=$map->draw();
$daLayer->draw($image);
$image_url=$image->saveWebImage();
Points are displayed on the map, but no text. What am I doing wrong?
I will appreciate any help,
Helen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20091203/1c50cb15/attachment.htm>
More information about the MapServer-users
mailing list