<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">


<META content="MSHTML 6.00.2800.1528" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=170455907-26012006><FONT face=Arial color=#0000ff size=2>To 
change an attribute of added point You have to also update a dbase file (I don't 
see that in your code)&nbsp;wihich stores all atributes of shapes in shp.file, 
otherwise you get nothing. And if you try to open such a file in ArcViwe it will 
promt taht tha file was damaged which is because dbf. file record number doesn't 
mach shp. file record number.</FONT></SPAN></DIV>
<DIV><SPAN class=170455907-26012006><FONT face=Arial color=#0000ff 
size=2>dbase.dll which is used to create and update dbf. file comes with 
standard distribution off all lates php binaries</FONT></SPAN></DIV>
<DIV><SPAN class=170455907-26012006><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=170455907-26012006><FONT face=Arial color=#0000ff 
size=2>ragards</FONT></SPAN></DIV>
<P><FONT face="Arial CE" size=2>Artur Skalski</FONT> </P>
<P><B><FONT face="Arial CE" color=#000080 size=2>ACXIOM 
Polska</FONT></B><BR><FONT face="Arial CE" color=#000080 
size=2>Telephone:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (+48 22) 606 11 
27&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Budynek 
Saturn<BR>Facsimile:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (+48 22) 606 11 
28&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Domaniewska 41<BR>Mobile: 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (+48) 503 070 
036&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 02-672 Warszawa</FONT><FONT 
face="Arial CE" color=#000080><BR></FONT><FONT face="Arial CE" color=#000080 
size=2>E-mail: &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
artur.skalski@acxiom.com</FONT> </P>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV class=OutlookMessageHeader dir=ltr align=left><FONT face=Tahoma 
  size=2>-----Original Message-----<BR><B>From:</B> UMN MapServer Users List 
  [mailto:MAPSERVER-USERS@LISTS.UMN.EDU]<B>On Behalf Of </B>Xiaonan 
  Zhang<BR><B>Sent:</B> Wednesday, January 25, 2006 6:02 PM<BR><B>To:</B> 
  MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Subject:</B> [UMN_MAPSERVER-USERS] How to 
  edit attribute of a selected shape?<BR><BR></FONT></DIV>
  <DIV>Dear all,</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>I am tring to create a function which can add comment point onto layer 
  however I got a few problems here:</DIV>
  <DIV>1. the newly added one always overwrite the existing point so there is 
  always only one point in that layer.</DIV>
  <DIV>2. I can not regain the added point.</DIV>
  <DIV>3. how to change the attribute of the added point, say there is one 
  attribue called "Comment".</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>thanks. </DIV>
  <DIV>&nbsp;</DIV>
  <DIV>My code is:</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>//Create a new comment 
  point<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $ClickGeo = 
  ms_newPointObj();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  $ClickGeo-&gt;setXY($nClickGeoX, 
  $nClickGeoY);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  //printf("ClickGeoX %f&lt;BR&gt;\n",$nClickGeoX); 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//printf("ClickGeoY 
  %f&lt;BR&gt;\n",$nClickGeoY);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Add 
  it to the comments 
  layer<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$shape = 
  ms_newShapeObj(MS_SHAPE_POINT);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$line 
  = ms_newLineObj(); 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$line-&gt;add($oClickGeo);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$shape 
  -&gt;add($line);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$poLayer 
  = $gpoMap-&gt;getlayerbyname(comments); //get the layer 
  "comments"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$poLayer-&gt;open();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//printf("Layer 
  Name: %f&lt;BR&gt;\n", 
  $poLayer-&gt;name);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$poLayer-&gt; 
  addfeature($shape); //add the new comment point&nbsp; 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Save 
  the changes&nbsp;&nbsp; 
  &nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;$cmmShapefile = "../htdocs/data/comments"; 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$objShapefile 
  = ms_newShapeFileObj( $cmmShapefile, MS_SHP_POINT ); 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$objShapefile-&gt;addshape($shape);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$objShapefile-&gt;free;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;$poLayer-&gt;close(); 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Task2: 
  Use layer-&gt;querybypoint to regain the newly added point and then change 
  it's comment attribut 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;//Task2.1:get 
  the new added comment 
  point<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;$poLayer-&gt;querybypoint($oClickGeo, MS_SINGLE, 2); 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;$numResults = 
  $poLayer-&gt;getNumResults();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;printf("Find point: %f&lt;BR&gt;\n", 
  $numResults);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp; 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;$oRes = $poLayer-&gt;getResult(0); 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;printf("tileindex: %f&lt;BR&gt;\n", 
  $oRes-&gt;tileindex);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;printf("SHAPEINDEX: %f&lt;BR&gt;\n", 
  $oRes-&gt;shapeindex);&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp; 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;&nbsp;$oShape = $poLayer-&gt;getShape(-1,0); 
  //(-1,-1)<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;&nbsp;print_r($oShape-&gt;values); //print the keys of the 
  values 
  array<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;&nbsp;$comment = $oShape-&gt;Values["Comment"]; 
  <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  &nbsp;&nbsp;&nbsp;&nbsp;printf("The comment attribute is ---: 
  %f&lt;BR&gt;\n",$comment ); //display comment 
  attribute<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
  </DIV></BLOCKQUOTE><pre>***************************************************************************
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally
privileged.

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank You.
****************************************************************************
</pre></BODY></HTML>