If you want to load the GoogleMaps from Javascript, instead standard in-head-script-tag, you have to use a callback-function. Otherwise the maps is not loaded completly.
if (typeof google == "undefined") {
jQuery.getScript("http://maps.google.com/maps/api/js?sensor=false&callback=open_google_map")
// no success callback necessary, google can load our stuff-todo-function
} else {
// if gmaps already loaded, we can just continue whatever else we want to do
open_google_map()
}
This above snippet was used, to open up a googlemap in a modal/Lightbox-frame. In this way, GoogleMaps Javascript is only loaded, when the user really wants to see a map
Reposted from notes.it-jobs-und-stellen.de