Google Maps: Unspecified error in main.js Line: 33

03/23/2011
0

Just a quick hint for those getting this Javascript error with IE9, IE8, IE7 etc. and Google Maps.

You are probably used to the standard jQuery way to wait till the page / DOM is ready.

$(function() {

    // Your Google Maps code here

});

This is not good enough for IE and Google Maps and you will get this:

IE Google Maps unspecified error

The following solved it for me:

$(window).load(function() {

    // Your Google Maps code here

});

This will wait till the whole page including graphics is loaded.

If you've read this far you might as well follow me on Twitter here.


Comments