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

Ghulam Muqtada muqtada at hotmail.com
Thu Oct 19 02:25:43 EDT 2006


 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

> Date: Thu, 19 Oct 2006 09:38:36 +1000> From: wayne at datalinktech.com.au> 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,> The code you have shown us is not XML at all. It looks like you are > constructing a string> with Javascript. Have you read and understood the contents of this page > yet?> > http://ka-map.ominiverdi.org/wiki/index.php/Overlay_API_Reference> > Please ensure that myXmlOverlay.loadXml() is being fed with the right > information. Something like this.> > <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>> > And read the FAQ on that page to ensure the right headers are sent.> > Cheers,> Wayne> > Ghulam Muqtada wrote:> > Hi> > > > I am stuck with thing in Ka XmlOverlay, I have a php file that > > generates Xml points , this is fucntion that create points> > > > function getCoordinates($i,$scale,$node_name,$x,$y)> > {> > $str="";> > $str.=" var my_point$i = myXmlOverlay.addNewPoint('$node_name',$x,$y);"> > ." var my_label$i= new kaXmlLabel();"> > ." var my_icon$i= new kaXmlIcon();"> > ." my_label$i.text='$node_name';"> > ." my_label$i.boxcolor=\"#ff0000\";"> > ." my_label$i. h=\"10\";"> > ." my_label$i. w=\"50\";"> > ." my_label$i.font=\"Arial\";"> > ." my_label$i.color=\"#000000\";"> > ." my_label$i.xoff=\"5\";"> > ." my_label$i.yoff=\"5\";"> > ." my_icon$i.icon_w=\"20\";"> > ." my_icon$i.icon_h=\"41\";"> > ." my_icon$i.icon_src=\"images/scar75.gif\";"> > ." my_icon$i.draw(my_point$i);"> > ." my_label$i.draw(my_point$i);";> > return $str;> > }> >> >> > may I call this class say "XmlPoints.php" in setInterval so that i > > can get fresh values ?> > becuase myXmlOverlay.loadXml() doesnot work here, since it needs some > > document that has <overlay></overlay> type stuff> > > > > > any help will be really appreciable> > > > Regards> > G.Muqtada> >> >> >> >> >> > ------------------------------------------------------------------------> > Date: Wed, 18 Oct 2006 18:15:45 +0200> > From: pg.navone at gmail.com> > To: wayne at datalinktech.com.au> > Subject: Re: [ka-Map-users] XMLOverlay Multiple Items at Same Point> > CC: ka-map-users at lists.maptools.org> >> > Unfortunately the disk of my server crashed in August and I have> > not yet reinstalled the public demo.> >> > Sorry.> >> >> > 2006/10/18, Wei Yang, Ng - Wayne < wayne at datalinktech.com.au> > <mailto:wayne at datalinktech.com.au>>:> >> > Hi Jeff,> > You must be referring to a point collision system for> > kaXmlOverlay.> > The good news is that I have implemented such a feature for> > kaXmlOverlay.js about 2 months ago. This feature works in> > Mozilla/IE/Opera and should work with others too. The bad news> > is that I> > have yet to merge it with the current release of ka-map in cvs> > due to> > other commitments and deadlines. Do let me know if you would> > like a copy> > of my source code and an explanation on how it works. I am> > currently> > using the overlib javascript library for point popups. These> > popups> > allow me to list the items within collision points.> >> > Hi Pg,> > I should get cracking on merging my stuff with yours. Do you> > have an> > existing ka-map demo setup so that we may demonstrate point> > collision?> >> > Cheers,> > Wayne> >> >> >> > ------------------------------------------------------------------------> > Search from any Web page with powerful protection. Get the FREE > > Windows Live Toolbar Today! Try it now! > > <http://get.live.com/toolbar/overview>
_________________________________________________________________
Express yourself with gadgets on Windows Live Spaces
http://discoverspaces.live.com?source=hmtag1&loc=us
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20061019/74e98176/attachment.html


More information about the ka-Map-users mailing list