<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY bgColor=#ffffff>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2>Murat,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2>Are you sure you want all your villages to have the same 
label ($villagename)?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2>I think you may want to define a 
labelitem:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2>$point_layer-&gt;set("labelitem","villagename"); // 
"villagename" is the name of the attribute of the layer</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2>Also, you quoted "$koyadi", which is probably not correct. 
Or remove the '$'.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2>Have you tested whether any part of this code works? Which 
part is giving you trouble? Does your PHP log say anything?</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2>regards,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2>Jacob</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=012520108-26092006><FONT face=Arial 
color=#0000ff size=2></FONT></SPAN>&nbsp;</DIV><BR>
<BLOCKQUOTE 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <HR tabIndex=-1>
  <FONT face=Tahoma size=2><B>From:</B> UMN MapServer Users List 
  [mailto:MAPSERVER-USERS@LISTS.UMN.EDU] <B>On Behalf Of </B>Murat 
  BEYHAN<BR><B>Sent:</B> 26 September 2006 15:56<BR><B>To:</B> 
  MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> [UMN_MAPSERVER-USERS] adding 
  label to point layer in PHPMapscript<BR></FONT><BR></DIV>
  <DIV></DIV>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>&nbsp;$map_path="/var/www/html/zone/"; 
  <BR>&nbsp;$map = ms_newMapObj($map_path."zone.map"); 
  <BR>&nbsp;$map-&gt;setExtent($nMinX, $nMinY, $nMaxX, $nMaxY); <BR>&nbsp; 
  <BR>// create a temp layer to hold our points <BR>$point_layer = 
  ms_newLayerObj($map); <BR>$point_layer-&gt;set("name", "$koyadi"); 
  <BR>$point_layer-&gt;set("type", MS_LAYER_POINT); 
  <BR>$point_layer-&gt;set("status", MS_DEFAULT); 
  <BR>$point_layer-&gt;setProjection("proj=latlong",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("cpoint"); 
  <BR><BR>$point_style-&gt;set("symbol", $point_symbol); 
  <BR>$point_style-&gt;set("size", 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("position", MS_CC); 
  <BR>$label-&gt;set("font","sans"); <BR>$label-&gt;set("type",MS_TRUEYPE); 
  <BR>$label-&gt;set("size",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>&nbsp;$ref = 
  $map-&gt;drawreferencemap(); <BR>&nbsp;$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, ""); <BR>&nbsp; 
  $map_url=$image-&gt;saveWebImage(); <BR>&nbsp; $ref_url = 
  $ref-&gt;saveWebImage(); <BR>&nbsp; 
  $legend_url=$legend-&gt;saveWebImage();&nbsp; <BR><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. </BLOCKQUOTE></BODY></HTML>