This is how I do it, works in all browsers we have here to test:
function LoadGoogleMaps() {
window.onunload=UnloadGoogleMaps;
document.getElementById("googlemapsdiv").innerHTML = "Please wait,
loading map...";
var APIScript = document.createElement("script");
APIScript.type = "text/javascript";
APIScript.src = "http://maps.google.co.uk/maps?
file=api&v=2&sensor=false&key=**YOURKEY**&async=2&callback=StartGoogleMaps";
document.body.appendChild(APIScript);
} // end StartGoogleMaps
function StartGoogleMaps() {
if (GBrowserIsCompatible()) {
*** USUAL MAP STUFF HERE ***
}
}
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---