<DIV>Hey Rosairo,</DIV>  <DIV>&nbsp;</DIV>  <DIV>Thanks for a great answer. In one mail I am now very clear with the functioning of Kamap. But I still need your help so as to learn where to put these code. </DIV>  <DIV>&nbsp;</DIV>  <DIV>I tried copying the php code in tile.php and created an xml file named points.xml in the directory where my tile.php is present. It didn't work. One thing, where is the function 'add_point_to_layer' defined? I will try once again by cleaning the Kachace. Meanwhile, please let me know if I am doing something wrong.</DIV>  <DIV>&nbsp;</DIV>  <DIV>Also, I liked the idea of using Javascript but again I am confused that which file should contain this Javascript? Again, is there any .js file within Kamap directory having 'addObjectGeo' function?</DIV>  <DIV>&nbsp;</DIV>  <DIV>Thanks for sparing time in answering my questions..</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV>  <DIV>Puneet<BR><BR><BR><B><I>The Bun &lt;rosario.carbone@ipl.com&gt;</I></B>
 wrote:</DIV>  <BLOCKQUOTE class=replbq style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #1010ff 2px solid"><BR>You mentioned PHP then I assume you want to add points server side. As far as<BR>I know, I am new myself to kaMap, you can do it adding the points in the<BR>mapfile itself but it is not very popular, there are many techniques I'll<BR>tell you what I have done in my prototype, I create dinamically an xml file<BR>that contains the <BR>coordinates of the points I want to add, but you can have a database, a file<BR>or anything else you need as data source, anyway I have done this way with<BR>my xml ( the bolded part is the part you actually really need ):<BR><BR>tile.php:<BR><BR>// Create a DOM object<BR>$doc = new DOMDocument();<BR>// Load the xml file<BR>$doc-&gt;load("points.xml");<BR>// Get the first "point" element<BR>$points = $doc-&gt;getElementsByTagName("point");<BR>// Parse all the "point" elements<BR>foreach( $points as $point )<BR>{<BR>// Get the
 coordinates from the "point" element<BR>$longitudes = $point-&gt;getElementsByTagName( "longitude" );<BR>$longitude = $longitudes-&gt;item(0)-&gt;nodeValue;<BR>$latitudes = $point-&gt;getElementsByTagName( "latitude" );<BR>$latitude = $latitudes-&gt;item(0)-&gt;nodeValue;<BR>// Get the layer from the map<BR>$layer = $oMap-&gt;getLayerByName("selpoint");<BR>// Add the point to the map<BR>add_point_to_layer($layer, $longitude, $latitude); }<BR><BR>Just for your information my where "points.xml" is structured this way:<BR><BR><?xml version="1.0" encoding="iso-8859-1"?><BR><POINTS><BR><POINT><BR><LONGITUDE>-476249.61</LONGITUDE> <BR><LATITUDE>1543401.94</LATITUDE> <BR></POINT><BR><POINT><BR><LONGITUDE>-474133.08</LONGITUDE> <BR><LATITUDE>922866.17</LATITUDE> <BR></POINT><BR></POINTS><BR><BR>I was nearly forgotting, I needed the layer "selpoint" predefined in<BR>mapfile:<BR><BR>LAYER <BR>NAME selpoint<BR>TYPE POINT<BR>STATUS ON<BR>CLASS<BR>NAME "selpoint"<BR>SYMBOL 2<BR>COLOR
 255 0 0 <BR>LABEL<BR>TYPE bitmap<BR>END<BR>STYLE<BR>SYMBOL 2<BR>SIZE 20<BR>COLOR 255 0 0 <BR>END<BR>END<BR>TOLERANCE 5<BR>END <BR><BR>I couldn't find a complete dynamic working example anywhere, in fact I<BR>wanted to create a layer in the code, in memory, and use that dynamic layer<BR>for adding my points all in the in the PHP code but I failed.<BR><BR>Anyway I think much more interesting in my opinion is adding points client<BR>side, this is all in JavaScript. This I used in my prototype, it is hard<BR>coded but it is just as example:<BR><BR>// Prepare the array of images <BR>var imgArray = new Array();<BR>imgArray[0] = document.createElement( 'img' );<BR>imgArray[0].src = 'images/kamap.gif';<BR>imgArray[1] = document.createElement( 'img' );<BR>imgArray[1].src = 'images/kamap.gif';<BR>// Add the first object <BR>var lon = -476249.61;<BR>var lat = 1543401.94; <BR>myKaMap.addObjectGeo( myKaMap.createDrawingCanvas( 500 ), lon, lat,<BR>imgArray[0]);<BR>// Add the second
 object<BR>lon = -474133.08;<BR>lat = 922866.17; <BR>myKaMap.addObjectGeo( myKaMap.createDrawingCanvas( 500 ), lon, lat,<BR>imgArray[1]);<BR><BR>Regards<BR>Rosario Carbone<BR><BR><BR>pjqcf wrote:<BR>&gt; <BR>&gt; All,<BR>&gt; <BR>&gt; I have just installed Kamap on my machine and was able to get customized<BR>&gt; shapefile loaded on it. Now the next obvious thing is to plot a point on<BR>&gt; the top of my map that is showing from the map file.<BR>&gt; <BR>&gt; My understanding is: This is done using PHP coding. But I don't have any<BR>&gt; starting point.<BR>&gt; <BR>&gt; It would be really helpful if someone could help me understand how to do<BR>&gt; this?<BR>&gt; <BR>&gt; Thanks in advance..<BR>&gt; <BR>&gt; Puneet<BR>&gt; <BR>&gt; __________________________________________________<BR>&gt; Do You Yahoo!?<BR>&gt; Tired of spam? Yahoo! Mail has the best spam protection around <BR>&gt; http://mail.yahoo.com <BR>&gt; _______________________________________________<BR>&gt;
 ka-Map-users mailing list<BR>&gt; ka-Map-users@lists.maptools.org<BR>&gt; http://lists.maptools.org/mailman/listinfo/ka-map-users<BR>&gt; <BR>&gt; <BR><BR>-- <BR>View this message in context: http://www.nabble.com/Novice-on-KaMap---how-to-plot-a-point-on-Kamap--tf4789050.html#a13702689<BR>Sent from the ka-map-users mailing list archive at Nabble.com.<BR><BR>_______________________________________________<BR>ka-Map-users mailing list<BR>ka-Map-users@lists.maptools.org<BR>http://lists.maptools.org/mailman/listinfo/ka-map-users<BR></BLOCKQUOTE><BR><p>&#32;__________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br>http://mail.yahoo.com