I always give the absolute dimensions of the map canvas to display the map. For example, I use this code so that the map fills the entire display area of ββthe document:
var wnd = $(window); var jMap = $("#map"); var map = new google.maps.Map(jMap[0], { zoom: 10, center: new google.maps.LatLng(50.50714570, 5.419846499999999), mapTypeId: google.maps.MapTypeId.ROADMAP }); function resize() { jMap.width(wnd.width()); jMap.height(wnd.height()); google.maps.event.trigger(map, "resize"); } wnd.resize(resize); resize();
Where map - div map identifier
source share