On 2 December 2010 20:29, brian <[email protected]> wrote: > thanks one and all. > > I can create the XML file from php...yes. I would of course have a script > running on the server to create the current xml file. > > So next is to read the XML file.
You don't need to create a real XML file. You can call the PHP script and return XML -- rather like a PHP script can return an HTML page. > I found a very nice presentation in the api blog > > http://googlemapsapi.blogspot.com/2007/02/gdownloadurl-update-better-error.html > > so I copied that page and the data file and have it working nicely....I then > added the setInterval("load()",10000) near the end of the script. > > At this point I am having a problem in getting "fresh data"... I keep > getting old data. (As predicted by Larry in this thread). He mentions a > parameter that will make this problem go away....well I am stuck at this > point.....I tested this by increasing the interval to one minute...went and > switched the data file and the map loaded again but no change in the marker > points. So how do I keep the page from caching the data? Use a random parameter, like Math.random() or the current time, on the end of the script/file's url. It will be enough to force the browser to fetch it afresh with every request: myurl.php?x where x is a random parameter. > question about xml-------can I also pass all the data that would go in the > infowindow?......gotta have that. > > may also want to read polyline data, so I guess I have to learn more about > xml.....let me get through these hoops first. Of course. Here's an example XML: http://www.achurchnearyou.com/xml/getparish_new.php?code=100281 That's not a static file; the php script produces XML. Any of the data in it could be used in an infoWindow, or to draw a line (which is that file's primary purpose). -- You received this message because you are subscribed to the Google Groups "Google Maps API V2" 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.
