javascript - Is it possible to gracefully handle a Google Maps AJAX request timeout? -


Uses the site in situations where Google is slow on connection and the map can not be provided at any reasonable time I need a JavaScript callback method, which I can display a useful message to the user instead of calling. ... 'message is constantly displayed.

Can it get?

Maybe you might be a sleeping action that will check whether the page is yet Loaded, and after a certain time you take some kind of action.

setTimeout can also be useful

So, you will have:

  SetTimeout ((function () (test (/) if the page is loaded, if so, call another function or set the flag to be set * /}), 2000); // Set for 2 seconds  

Comments