<HTML>
<HEAD>
<META content="text/html; charset=iso-8859-9" http-equiv=Content-Type>
<META content="OPENWEBMAIL" name=GENERATOR>
</HEAD>
<BODY bgColor=#ffffff>
Dear Jacob,
<br />Thank you for your suggestion.
<br />The following php codes bring one of the record from mysql I mean only one row.
<br />
<br />That row consist of the cityname (iladi), districtname (ilceadi) and village name (koyadi).
<br />
<br />
<br />$query = &quot;SELECT * FROM $db_tb WHERE iladi LIKE '$iladi' AND
<br />ilceadi LIKE '$ilceadi' AND koyadi LIKE '$koyadi'&quot;;
<br />
<br />$result = mysql_query($query) or die(&quot;Query failed : &quot; . mysql_error());
<br />
<br />
<br />
<br />$num = mysql_numrows($result);
<br />                    $i=0;
<br />while ($i &lt; $num) {
<br />$koyadi    = mysql_result($result,$i,&quot;koyadi&quot;);
<br />$ilceadi     = mysql_result($result,$i,&quot;ilceadi&quot;);
<br />$iladi       = mysql_result($result,$i,&quot;iladi&quot;);
<br />$zone         = mysql_result($result,$i,&quot;zone&quot;);
<br />$lon          = mysql_result($result,$i,&quot;lon&quot;);
<br />$lat          = mysql_result($result,$i,&quot;lat&quot;);
<br />                    ++$i;
<br />}
<br />
<br />&gt; Have you tested whether any part of this code works? Which part is giving you trouble? Does your PHP log say anything?
<br />By using this query result I'm drawing point of the village on the map.
<br />The part of this issue does work succesfully. I mean drawing of the point was achieved already by the support of the list user.
<br />The second step Which I intend to write the name of village near to point.
<br />
<br />So I was changed the name of koyadi into villagename in order to understand for people in my message. sorry.
<br />Now I have tried to ad your suggestion into the php code but still the name of village doesnt appearing on the map..
<br />I hope I could explained What I'm trying to do.
<br />Thanks.
<br />Murat
<br />
<br />The new codes are here after your suggestion. But I2m not sure exacly where I have to put your suggestion on the code.
<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;markers&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_layer-&gt;set(&quot;labelitem&quot;,&quot;$koyadi&quot;);
<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 />
<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 />
<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 />echo $longitude, ' ', $lat;
<br />
<br />$point-&gt;setXY($longitude, $latitude);
<br />
<br />$point-&gt;draw($map, $point_layer, $image, 0, &quot;&quot;);
<br />
<br />
<br />  $map_url=$image-&gt;saveWebImage();
<br />  $ref_url = $ref-&gt;saveWebImage();
<br />  $legend_url=$legend-&gt;saveWebImage(); 
<br /> 
<br /> 
<br />
<br />
<br />
<br />
<br />
<br />
<br />On Tue, 26 Sep 2006 16:04:33 +0800, Delfos, Jacob wrote
<br />&gt; Murat,
<br />&gt;  
<br />&gt; Are you sure you want all your villages to have the same label ($villagename)?
<br />&gt; I think you may want to define a labelitem:
<br />&gt;  
<br />&gt; $point_layer-&gt;set(&quot;labelitem&quot;,&quot;villagename&quot;); // &quot;villagename&quot; is the name of the attribute of the layer
<br />&gt;  
<br />&gt; Also, you quoted &quot;$koyadi&quot;, which is probably not correct. Or remove the '$'.
<br />&gt;  
<br />&gt; Have you tested whether any part of this code works? Which part is giving you trouble? Does your PHP log say anything?
<br />&gt;  
<br />&gt; regards,
<br />&gt;  
<br />&gt; Jacob
<br />&gt;
<br />
<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>