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
This has been my problem while following the tutorial on Google.
The problem is that you should execute the javascript after the page loads, you can call the function on the GET parameter while calling the Google Map script:
YourFunctionHere is a callback function means it will only execute after the page loads.
Or you can can call functions after the page loads. Example: window.onload = Yourfunction();
Now, inside that function is where you would do your Google Maps API stuff like document.getElementById('source_map') and all methods that belong to the google class.