[ka-Map-users] Adding objects to map (kaMap 1.0)
Pasi Patama
ppafin at gmail.com
Mon May 14 22:37:28 EDT 2007
Ok, I got it working. Reasons were clear, but not documented.
I had to modify file: tools/kaExplorer/startup.js
With following two lines (just before drawPage()):
myXmlOverlay = new kaXmlOverlay( myKaMap, 250 );
myXmlOverlay.loadXml('points.php');
This brings points from file points.php:
--CUT--
<?php
header("Content-Type: text/xml");
header("Cache-Control: no-store, no-cache, must-revalidate");
echo '<?xml version="1.0" encoding="UTF-8"?>'
?>
<overlay>
<point x="26.76" y="61.6" id="P1">
<label>Place1</label>
<symbol shape="bullet" size="10" opacity="1" color="#FF0000" />
</point>
<point x="25.047750" y="60.209314" id="P2">
<label>Station31</label>
<symbol shape="bullet" size="10" opacity="1" color="#FF0000" />
</point>
</overlay>
--CUT--
And contents of this points.php was mistyped by me. I highly recommend
firebug ajax debugger, it saved my day!
BUT, there is still one question. How do I make this refreshing work :
myInterval = setInterval("myXmlOverlay.loadXml('xmlget.php')",5000);
What file would be requested in place of xmlget.php which was in wiki
example ?
Regards,
Pasi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ka-map-users/attachments/20070515/d7c4bd9b/attachment.html
More information about the ka-Map-users
mailing list