On Wed, Oct 19, 2011 at 4:14 AM, Sasha <[email protected]> wrote: > I added a javascript alert at the end of the loading of the API. Just so > that I would knw when it loaded completely. Also, I waited for like 15mins > before trying to access the application (If that wasnt enuf time for the API > to load then woah!!! )
The cause of this problem will probably be immediately obvious to any experienced Maps API or JavaScript developer, if we could only see your actual page. In the meantime, a few tips: * Don't use alert() for debugging. It can affect the order of execution of your code in a surprising way. Instead use console.log() with the Firebug extension for Firefox, or with the built-in debugging tools of IE, Chrome, or Safari. Also use the debugger; statement which lets you stop your code in the debugger and look at the actual values of variables and such. * When your HTML souce contains multiple <script> tags, the code inside those tags is executed in the order in which the <script> tags appear. If you load the Maps API with an ordinary <script> tag (i.e. *not* using the "asynchronous" method of loading it), then the Maps API objects will be available to <script> tags which follow. You don't need to "wait" for the API to load, and certainly don't need to wait 15 minutes or any arbitrary amount of time. * Post that link and get your answer... :-) -Mike -- 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.
