I searched for this error everywhere and did not find anything that works. Here is the code:
MapsLoader.prototype._setup = function () {
var promise = new RSVP.Promise(function (resolve) {
window.gmapsLoaded = function () {
console.log('[Maps Loader] Loaded');
resolve();
};
console.log('[Maps Loader] Loading...');
var mapsURL = 'https://maps.googleapis.com/maps/api/js?key=' + config.googleMaps.APIKey + '&sensor=false&callback=gmapsLoaded',
script = $('<script />').attr('src', mapsURL);
$('head').append(script);
});
promise.then(function () {
window.gmapsLoaded = undefined;
});
return promise;
};
This is the part of the module MapsLoaderthat is simply added to the Google Maps script in head(only when necessary), awaits the Google Maps download callback, and then resolves the promise (at this point the file that uses it may start to do things).
Works well in Safari, Chrome, Firefox, and IE10. However, in IE 8 and 9, I get an error:
Object doesn't support property or method 'Load' (IE9)Object doesn't support property or method (IE8)
What comes from line 55 of the main.jsGoogle Maps file :
k.google.maps.Load(...)
This occurs after the “Load Loader Loaded” log message, so the callback is executed and the page continues to load normally, except that the Google Maps area is empty.
(.. IE Developer Tools), , , - .
, Google Maps head , IE ( , google MapsLoaded). , , .
: RequireJS .
, :
async=2 URL- Google ( )body head ( API Google)$.ready