How to check if Google Maps API (v3) is loaded?
I do not want to execute mapping scripts if the API did not load due to internet connectivity problems (web page is h
Just so you know, there's an issue with the accepted answer. It will return true if the script has loaded otherwise 'typeof google' may return undefined and throw an error. The solution to this is:
if ('google' in window && typeof google === 'object' && typeof google.maps === 'object') {...}
This makes sure a boolean value is always returned.