In Chrome it fails in loadScript() on this line:

   document.documentElement.firstChild.appendChild(script);

It turns out that the firstChild of document.documentElement in Chrome 
is a Comment() object rather than a HTMLElement, and you can't 
.appendChild a script to a Comment().

Perhaps you might try
   document.documentElement.getElementsByTagName("head")[0].appendChild(sc
ript);

which appends the script to a HTMLHeadElement() rather than a Comment().



However, there have been various other problems reported from time to 
time with own-code attempts to load the Maps API on demand. A safer 
solution is to use the Google AJAX API loader (jsapi), which works in 
all supported browsers and is futureproof.

http://code.google.com/apis/maps/documentation/index.html#AJAX_Loader

-- 
Mike Williams
http://econym.org.uk/gmap



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to