Google Maps v3 load partially on top left corner, resize event does not work Google Maps v3 load partially on top left corner, resize event does not work jquery jquery

Google Maps v3 load partially on top left corner, resize event does not work


I've had this issue before too and fixed it by waiting for the map's 'idle' state (i.e. when it's finished) and then calling the resize:

google.maps.event.addListenerOnce(map, 'idle', function() {   google.maps.event.trigger(map, 'resize');});


I think your map is hidden at the time you create it: there's a display:none on the #summary-content div that the map is nested inside.

You should try triggering the resize event after that div is made visible instead of during initialization.

In fact, you could probably just call your initializeMap() function event at the time that div is made visible, instead of calling it in your .ready() function.


I had the issue with all maps other than the first loaded map showing in the top left corner with the rest of the map having not loaded and therefore showing in grey.

Was scratching my head for some time but managed to solve it with:

google.maps.event.addListenerOnce(map, 'idle', function() {       google.maps.event.trigger(map, 'resize');       map.setCenter(latLng);    });

It was a easy solution thanks to Ian Devlin and d.raev and just wanted to say thanks and share the code that solved it for me seeing as I can't comment or vote up yet!

I called that after creating the map with:

map = new google.maps.Map(document.getElementById("business-location-"+business_username), map_options);

so if you've got this problem put it right under where you create your map too!