<HTML>
<HEAD>
<META content="text/html; charset=iso-8859-9" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
Dear Friends,
<br />
<br />I'have draw point layer by using php. That point only one in the map.
<br />Now I would like to make label for that point as $villagename
<br />I have tried following codes but I think something wrong.
<br />Could you help me What is my mistake...
<br />Regards
<br />Murat 
<br />$villagename='kanamura';
<br /> $map_path=&quot;/var/www/html/zone/&quot;;
<br /> $map = ms_newMapObj($map_path.&quot;zone.map&quot;);
<br /> $map-&gt;setExtent($nMinX, $nMinY, $nMaxX, $nMaxY); 
<br /> 
<br />// create a temp layer to hold our points
<br />$point_layer = ms_newLayerObj($map);
<br />$point_layer-&gt;set(&quot;name&quot;, &quot;$koyadi&quot;);
<br />$point_layer-&gt;set(&quot;type&quot;, MS_LAYER_POINT);
<br />$point_layer-&gt;set(&quot;status&quot;, MS_DEFAULT);
<br />$point_layer-&gt;setProjection(&quot;proj=latlong&quot;,MS_TRUE);
<br />
<br />// create a class and style for this layer
<br />$point_class = ms_newClassObj($point_layer);
<br />$point_style = ms_newStyleObj($point_class);
<br />$point_symbol = $map-&gt;getSymbolByName(&quot;cpoint&quot;);
<br />
<br />$point_style-&gt;set(&quot;symbol&quot;, $point_symbol);
<br />$point_style-&gt;set(&quot;size&quot;, 12);
<br />$point_style-&gt;color-&gt;setRGB(255,0,255);
<br />$point_style-&gt;outlinecolor-&gt;setRGB(255,255,0);
<br />
<br />$label = $point_class-&gt;label;
<br />$label-&gt;set(&quot;position&quot;, MS_CC);
<br />$label-&gt;set(&quot;font&quot;,&quot;sans&quot;);
<br />$label-&gt;set(&quot;type&quot;,MS_TRUEYPE);
<br />$label-&gt;set(&quot;size&quot;,MS_MEDIUM);
<br />$label-&gt;color-&gt;setRGB(22,8,3);
<br />$label-&gt;backgroundcolor-&gt;setRGB(0,0,0);
<br />$label-&gt;set(minsize,4);
<br />$label-&gt;set(maxsize,100000);
<br />
<br />// draw our image without the points
<br /> $ref = $map-&gt;drawreferencemap();
<br /> $legend=$map-&gt;drawLegend();
<br />
<br />$image = $map-&gt;draw();
<br />
<br />// initialize our point and add it to the map
<br />$point = ms_newPointObj();
<br />$longitude=$lon;// comes from select queries from mysql as a result 
<br />$latitude=$lat;// comes from select queries from mysql as a result 
<br />
<br />$point-&gt;setXY($longitude, $latitude);
<br />$point-&gt;draw($map, $point_layer, $image, 0, &quot;&quot;);
<br />  $map_url=$image-&gt;saveWebImage();
<br />  $ref_url = $ref-&gt;saveWebImage();
<br />  $legend_url=$legend-&gt;saveWebImage();  
<br />
</BODY>
<br />-- 
<br />This message has been scanned for viruses and
<br />dangerous content by
<a href="http://www.mailscanner.info/"><b>MailScanner</b></a>, and is
<br />believed to be clean.
</HTML>