title: keep google maps centered when window resize
body: <p>I am trying to center google maps when window is resized. I looked around many examples on stackoverflow but nothing of those seems to be working for me. Here's sample code:</p>
  
  <pre><code>google.maps.event.addDomListener(window, 'resize', function() {
    //Window Resize and Position map to center
    center = map.getCenter();
    google.maps.event.trigger(map, 'resize');
    map.setCenter(center);
  });
  </code></pre>
  
  <p>I have markers also on the map which should also fit accordingly when map is center positioned. Am I missing something here ?</p>