You need to have an event listener for when the window resizes. This worked for me (put it in your initialize function):
google.maps.event.addDomListener(window, 'resize', function() {
map.setCenter(center);
});
More Related Contents:
- Verify if a point is Land or Water in Google Maps
- Google Maps v3 – limit viewable area and zoom level
- How do I limit panning in Google maps API V3?
- How to make cross-domain AJAX calls to Google Maps API?
- Google maps Places API V3 autocomplete – select first option on enter
- How to call fromLatLngToDivPixel in Google Maps API V3?
- Google Maps JavaScript API RefererNotAllowedMapError
- Google Maps API – Getting closest points to zipcode
- Google maps API V3 – multiple markers on exact same spot
- Google Maps API v3: Can I setZoom after fitBounds?
- Midpoint of route in google maps
- How can I create numbered map markers in Google Maps V3?
- Google Maps JavaScript API won’t display markers from KML exported from My Maps
- Maximum Lat and Long bounds for the world – Google Maps API LatLngBounds()
- Google Maps API v3 adding an InfoWindow to each marker
- Inconsistent behaviour drawing a route between two points in Google Maps v3
- Country specific zoom level in Google Maps API
- polyline snap to road using google maps api v3
- Multiple markers Google Map API v3 from array of addresses and avoid OVER_QUERY_LIMIT while geocoding on pageLoad
- Google Maps Api v3 – getBounds is undefined
- Can I remove just the popup bubbles of POI’s in Google Maps API v3?
- Is there a way to Fix a Google Maps Marker to the Center of its Map always?
- Letting users draw curved lines on a google map?
- How can I modify the markers?
- Google Maps: Auto close open InfoWindows?
- fitbounds() in Google maps api V3 does not fit bounds
- Highlight polygon and tint rest of map using Google Maps [duplicate]
- Custom Google Map API V3 Zoom Buttons
- Google Maps API Multiple Markers with Infowindows
- Google maps API V3 method fitBounds()