You can use PHP to write an XML file, but you could echo the XML data 
directly to the default output channel. That means that you always get 
the latest data, and also allows you to perform queries on the data 
should you so desire.

The Javascript on the client doesn't care whether it reads the XML data 
from the server that you wrote in PHP or from a conventional file 
server.

I don't have mySQL on my webhost, but here's the source code of a PHP 
script that echoes XML to its default output channel:
   http://econym.org.uk/gmap/map11.php.txt
If you call the PHP script like
   http://econym.org.uk/gmap/map11.php?q=a
Then you'll see XML the data that it outputs.

I don't do mySQL, but you probably just have to
   select * from thefile
and insert the values into the text to be echoed, like this:
   while ($row = mysql_fetch_array($result)) {
     echo '<marker lat=" .$row['lat']. '" lng=" .$row['lng']. " ... />';
   }

The Javascript can read that with GDownloadUrl or GXmlHttp in exactly 
the same way that it would read a static XML file.
   http://econym.org.uk/gmap/example_map11a.htm

-- 
http://econym.org.uk/gmap
The Blackpool Community Church Javascript Team


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to