<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body> <BR>
Hi Wei Yang, Ng<BR>
<BR>
I found solution for the problem i discussed earlier, this is the code that calls PHP file and PHP file in turn returns KaXmlPoint, , I have implemented mouse over on Points too<BR>
<BR>
<BR>function showMap()<BR>{<BR> myXmlOverlay.remove();<BR> if(this.myInterval !=0)<BR> {<BR> this.myInterval=clearInterval(this.myInterval);<BR> }<BR> startOverLay(myKaMap.getCurrentScale(),myKaMap.getCurrentMap().name);<BR>}<BR>
<BR>function startOverLay(scale,lot_id)<BR>{<BR>
myXmlOverlay = new kaXmlOverlay( myKaMap,250);<BR> this.myInterval=setInterval("testLay("+lot_id+","+scale+");",5000);<BR>}<BR>
<BR>
<BR>function testLay(lot_id,scale)<BR>{<BR>var newScr = document.createElement("SCRIPT");<BR>newScr.src = "RNodesPosition.php?scale="+scale+"&lot_id="+lot_id;<BR>newScr.type="text/javascript";<BR>document.getElementsByTagName("head")[0].appendChild(newScr);<BR>}<BR><BR>
<BR>this is the link<BR>
<BR>
<A href="http://202.163.115.116:8081/BrightLot/new/login.php">http://202.163.115.116:8081/BrightLot/new/login.php</A><BR>
<BR>
username:user<BR>
password:user<BR>
<BR>
Can I group KaXmlpoints and toggle them in legends area , <BR>
<BR>
Thanks for replying<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR>
<BR> <BR>
<HR id=stopSpelling>
<BR>
> Date: Thu, 19 Oct 2006 20:37:20 +1000<BR>> From: genii6@gmail.com<BR>> To: muqtada@hotmail.com<BR>> CC: ka-map-users@lists.maptools.org<BR>> Subject: Re: [ka-Map-users] XMLOverlay Multiple Items at Same Point<BR>> <BR>> Hi Ghulam,<BR>> Yes you are right. loadXml loads only XML and wouldnt be able to <BR>> interpret the output from the code u showed me.<BR>> You would want to write a php script that generates valid XML that would <BR>> create your overlay points.<BR>> So what happens is that setInterval will periodically call the loadXml() <BR>> function and the loadXml will read the output<BR>> from your php file. I would suggest testing out your php file first by <BR>> calling it directly from your browser to see that<BR>> the output is what you really want.<BR>> <BR>> Cheers,<BR>> Wayne<BR>> <BR>> Ghulam Muqtada wrote:<BR>> ><BR>> ><BR>> ><BR>> > Wayne, I am not constructing XML document that has tags like <BR>> > <overlay><BR>> > <point x="7435386.24" y="6172463.1" id="p1"><BR>> > <label>just a label</label><BR>> > <symbol shape="bullet" size="10" opacity="1" color="#FF0000" /><BR>> > </point><BR>> > </overlay><BR>> ><BR>> > but I am creating kaXmlPoints manualy and adding it to XmlOVerlay like<BR>> > var my_poin = myXmlOverlay.addNewPoint('p1',349,786);<BR>> > var my_label= new kaXmlLabel();<BR>> > var my_icon= new kaXmlIcon();<BR>> > my_label.text='Title One';<BR>> > my_label.boxcolor='#ff0000';<BR>> > my_label. h='10';<BR>> > my_label. w='50';<BR>> > my_label.font='Aria';<BR>> > my_label.color='#000000';<BR>> > my_icon.icon_w='20';<BR>> > my_icon.icon_h='41';<BR>> > my_icon.icon_src='images/bullet.gif';<BR>> > my_icon.draw(my_point);<BR>> > my_label.draw(my_point);<BR>> ><BR>> > above code works fine on index_overlay.html when i call it on some <BR>> > event, but i want to have this thing in setInterVal , above code is <BR>> > written in some seperate PHP file that generates it.<BR>> ><BR>> > What I guess is loadXml requires xml URL and my PHP file is not <BR>> > generating XML tags rather it creates kaXmlPoint directly.<BR>> > <BR>> > <BR>> > Regards<BR>> > Ghulam Muqtada<BR>> ><BR><BR><br /><hr />Express yourself with gadgets on Windows Live Spaces <a href='http://discoverspaces.live.com?source=hmtag1&loc=us' target='_new'>Try it!</a></body>
</html>