I\'m trying to insert a Google map into a modal using Twitter Bootstrap. The modal shows up with the shape of the map present, but only part of the map is displayed, the res
I am also facing the same issue but i resolve 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 () {
var currentCenter = map.getCenter();
google.maps.event.trigger(map, 'resize');
map.setCenter(currentCenter);
map.setZoom(15);
});
after
map = new google.maps.Map(document.getElementById('map-canvas2'),mapOptions);