/ Published in: JavaScript

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
var center; function calculateCenter() { center = map.getCenter(); } google.maps.event.addDomListener(map, 'idle', function() { calculateCenter(); }); google.maps.event.addDomListener(window, 'resize', function() { map.setCenter(center); });
Comments
