title: Dynamic Google map zoom getBounds() undefined
body: <p>I have this piece of javascript code </p>
  
  <pre><code>    var myOptions = {
          zoom:9,
          mapTypeId: google.maps.MapTypeId.ROADMAP,
          mapTypeControl: false
      }
      var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
      var latlongcollection = new Array();
              // some more code to push latlng objects into latlongcollection
      map.setCenter(latlongcollection[0]);
  
      for(latlong in latlongcollection){
          map.getBounds().extend(latlong);
       }
  
       map.fitBounds(map.getBounds());
  </code></pre>
  
  <p>But everytime its giving me error map.getBounds() is undefined. center is set and even. zoom is set before I call map.getBounds(). Please help </p>