GDownloadUrl() is asynchronous. You send the GDownloadUrl request, then immediately set the zoom and centre. Some time late the data comes back from the server and your callback function gets executed, but by then it's too late.
alert() is synchronous. It pauses the execution of your code so that there's time for the reply to come back. The fix is to put your zoom and centre inside the callback function, like this: http://econym.org.uk/gmap/example_map14.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 -~----------~----~----~----~------~----~------~--~---
