9
I'm displaying google maps in my web page and it works correctly in all browsers except for Safari.
Safri whites out the page and the JS error says:
TypeError: Result of expression 'document.body' [null] is not an object. maps.google.com/maps/api/js?sensor=true®ion=nz&async=2&callback=initializeConfigMap:11
TypeError: Result of expression 'a' [null] is not an object. maps.gstatic.com/intl/en_us/mapfiles/api-3/5/11/main.js:30
The code this seems to be coming from is a script I'm linking to from google using this line:
$.getScript("http://maps.google.com/maps/api/js?sensor=true®ion=nz&async=2&callback=initializeConfigMap", function () {});
The script looks like this:
window.google = window.google || {};
google.maps = google.maps || {};
(function() {
function getScript(src) {
var s = document.createElement('script');
s.src = src;
document.body.appendChild(s);
}
var modules = google.maps.modules = {};
google.maps.__gjsload__ = function(name, text) {
modules[name] = text;
};
google.maps.Load = function(apiLoad) {
delete google.maps.Load;
apiLoad([null,[[["http://mt0.googleapis.com/vt?lyrs=m@158\u0026src=api\u0026hl=en-US\u0026","http://mt1.googleapis.com/vt?lyrs=m@158\u0026src=api\u0026hl=en-US\u0026"],null,null,null,null,"m@158"],[["http://khm0.googleapis.com/kh?v=88\u0026hl=en-US\u0026","http://khm1.googleapis.com/kh?v=88\u0026hl=en-US\u0026"],null,null,null,1,"88"],[["http://mt0.googleapis.com/vt?lyrs=h@158\u0026src=api\u0026hl=en-US\u0026","http://mt1.googleapis.com/vt?lyrs=h@158\u0026src=api\u0026hl=en-US\u0026"],null,null,"imgtp=png32\u0026",null,"h@158"],[["http://mt0.googleapis.com/vt?lyrs=t@127,r@158\u0026src=api\u0026hl=en-US\u0026","http://mt1.googleapis.com/vt?lyrs=t@127,r@158\u0026src=api\u0026hl=en-US\u0026"],null,null,null,null,"t@127,r@158"],null,[[null,0