FYI, I\'m not a JavaScript Ninja but felt like I\'ll become one when I did a lot of things based on Google Maps recently.
I implemented a map. User can search for go
Had the same issue while following the Google Tutorial. In my case the problem turned out to be the async keyword, which was causing the Google Maps script to execute asynchronously while the rest of the page continued parsing. Here's the fix:
defer keyword and not the async keyword. Code:
Using defer makes sure the script is executed when the page has finished parsing (source).