Due to some limitations, I cannot have the script tag for the Google Map API available on page load. I have tried adding the script to the page many different ways, including using jQuery to add a script tag like so:
$('head').append('<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>');
I have also tried to include it in a more manual way, like so:
var script = document.createElement("script");
script.src = 'http://maps.google.com/maps/api/js?sensor=false';
script.type = "text/javascript";
document.head.appendChild(script);
Both of these examples cause the entire page to become white and blank. Any thoughts on how I can do this?