Ok, thanks for the feedback. That sounds like a pretty good plan then.
I'll give it a try, something like this:

var files=['one.xml','two.xml','three.xml'];
var ifile=0;
GDownloadUrl(files[ifile],showfile);

function showfile(xmldata,responsecode)
{
   ....process xmldata and add to map...

   ifile++;
   if(ifile<files.length) GDownloadUrl(files[ifile],showfile);
}


On Aug 17, 4:25 pm, Rossko <[email protected]> wrote:
> > I considered looping through a list of file<1 2 3>.xml, calling
> > GDownloadUrl() for each one in turn, but how do you wait for one to
> > complete before doing the next one?
>
> That's straightforward.  Keep a global pointer to which one you're
> doing.
> In the callback function (which can now be common i.e. use the same
> callback function for each fetch), test to see if there's another file
> to fetch, start it off and increment the pointer.
--~--~---------~--~----~------------~-------~--~----~
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