[ka-Map-users] XMLOverlay Multiple Items at Same Point

Ghulam Muqtada muqtada at hotmail.com
Fri Oct 20 05:56:01 EDT 2006

Hi Wei Yang, Ng
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
function showMap(){               myXmlOverlay.remove();                if(this.myInterval !=0)                {                this.myInterval=clearInterval(this.myInterval);                 } startOverLay(myKaMap.getCurrentScale(),myKaMap.getCurrentMap().name);}
function startOverLay(scale,lot_id){
 myXmlOverlay = new kaXmlOverlay( myKaMap,250); this.myInterval=setInterval("testLay("+lot_id+","+scale+");",5000);}
function testLay(lot_id,scale){var newScr = document.createElement("SCRIPT");newScr.src = "RNodesPosition.php?scale="+scale+"&lot_id="+lot_id;newScr.type="text/javascript";document.getElementsByTagName("head")[0].appendChild(newScr);}
this is the link
Can I group KaXmlpoints and toggle them in legends area , 
Thanks for replying

> Date: Thu, 19 Oct 2006 20:37:20 +1000> From: genii6 at gmail.com> To: muqtada at hotmail.com> CC: ka-map-users at lists.maptools.org> Subject: Re: [ka-Map-users] XMLOverlay Multiple Items at Same Point> > Hi Ghulam,> Yes you are right. loadXml loads only XML and wouldnt be able to > interpret the output from the code u showed me.> You would want to write a php script that generates valid XML that would > create your overlay points.> So what happens is that setInterval will periodically call the loadXml() > function and the loadXml will read the output> from your php file. I would suggest testing out your php file first by > calling it directly from your browser to see that> the output is what you really want.> > Cheers,> Wayne> > Ghulam Muqtada wrote:> >> >> >> > Wayne, I am not constructing XML document that has tags like > > <overlay>> > <point x="7435386.24" y="6172463.1" id="p1">> > <label>just a label</label>> > <symbol shape="bullet" size="10" opacity="1" color="#FF0000" />> > </point>> > </overlay>> >> > but I am creating kaXmlPoints manualy and adding it to XmlOVerlay like> > var my_poin = myXmlOverlay.addNewPoint('p1',349,786);> > var my_label= new kaXmlLabel();> > var my_icon= new kaXmlIcon();> > my_label.text='Title One';> > my_label.boxcolor='#ff0000';> > my_label. h='10';> > my_label. w='50';> > my_label.font='Aria';> > my_label.color='#000000';> > my_icon.icon_w='20';> > my_icon.icon_h='41';> > my_icon.icon_src='images/bullet.gif';> > my_icon.draw(my_point);> > my_label.draw(my_point);> >> > above code works fine on index_overlay.html when i call it on some > > event, but i want to have this thing in setInterVal , above code is > > written in some seperate PHP file that generates it.> >> > What I guess is loadXml requires xml URL and my PHP file is not > > generating XML tags rather it creates kaXmlPoint directly.> > > > > > Regards> > Ghulam Muqtada> >
Express yourself with gadgets on Windows Live Spaces
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20061020/69d35397/attachment.html

More information about the ka-Map-users mailing list