[ka-Map-users] XMLOverlay Multiple Items at Same Point
Wei Yang, Ng - Wayne
wayne at datalinktech.com.au
Wed Oct 18 19:38:36 EDT 2006
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>
More information about the ka-Map-users
mailing list