title: re-sizing and re-centering a google map without access to a global variable "map"
body: <p>I have google maps implemented on my page and i want to be able to resize and recenter it After a particular event. Here is code i have found on the internet:</p>
  
  <pre><code>var center = map.getCenter();
  google.maps.event.trigger(map, "resize");
  map.setCenter(center);
  </code></pre>
  
  <p>Now this is all cool but i dont have access to a "map" global. Instead i have been able to use a jquery selector to get the map-canvas DOM like so:</p>
  
  <pre><code>google.maps.event.trigger($("#map-canvas")[0], 'resize');
  </code></pre>
  
  <p>but using <code>$("#map-canvas")[0];</code> doesnt work when i try to call getCenter() and setCenter(). Any ideas why?</p>
  
  <p>thanks</p>