<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Times New Roman";
        color:windowtext;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang="EN-US" link="blue" vlink="purple">

<div class="Section1">

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">Hello,</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> </span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">I couldn’t find documentation how to set the text labels dynamically
using MapScript. </span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">My application should show points with labels on the map. Points and
labels are obtained dynamically from the database or some text file.</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">I add the points to the layer and draw layer as following:</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> </span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">$my_point = ms_newpointObj();</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> </span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> $my_point->setXY(-75.895, 45.9227);</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> $my_point->project($projInObj,$projOutObj);</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> </span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> $line = ms_newLineObj();</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">$line->add($my_point);</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> $shape = ms_newShapeObj(MS_SHAPE_POINT);</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> $shape->add($line);</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> $shape->set(text, 'new point');</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> $daLayer->addFeature($shape);</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> </span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">$image=$map->draw();</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">$daLayer->draw($image);</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> $image_url=$image->saveWebImage();</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> </span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">Points are displayed on the map, but no text. What am I doing wrong?</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt"> </span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">I will appreciate any help,</span></font></p>

<p class="MsoNormal"><font size="3" face="Times New Roman"><span style="font-size:
12.0pt">Helen</span></font></p>

</div>

</body>

</html>