title: Gmaps4rails V2 - change default zoom
body: <p>I'm a complete noob, building my first rails app.  I successfully implemented Google-maps-for-rails V2, using apneadiving's tutorial on youtube: <a href="http://www.youtube.com/watch?v=R0l-7en3dUw&amp;feature=youtu.be">http://www.youtube.com/watch?v=R0l-7en3dUw&amp;feature=youtu.be</a></p>
  
  <p>My issue is that for each of my maps, I'm only showing one marker, and when the map loads, it adjusts to be fully zoomed.</p>
  
  <p>Searching around, there seems to be a lot of solutions for earlier versions of Gmaps4rails, but with V2, and creating the map via javascript, I can't seem to find a solution that works.</p>
  
  <p>For reference, my code is below:</p>
  
  <p>View:</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt;
        handler = Gmaps.build('Google');
        handler.buildMap({ provider: {}, internal: {id: 'map'}}, function(){
        markers = handler.addMarkers(&lt;%=raw @hash.to_json %&gt;);
        handler.bounds.extendWith(markers);
        handler.fitMapToBounds();
        }); &lt;/script&gt; 
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code>def show
    @pins = Pin.find(params[:id])
    @hash = Gmaps4rails.build_markers(@pins) do |pin, marker|
      marker.lat pin.latitude
      marker.lng pin.longitude
    end
  end
  </code></pre>
  
  <p>I tried making changes via the console using: gmap.setzoom(12), as suggested by some post, but haven't had any luck with that .</p>
  
  <p>Any help is much appreciated</p>
  
  <p><strong>Answer that worked for me: change view to:</strong></p>
  
  <pre><code>  &lt;script type="text/javascript"&gt;
    handler = Gmaps.build('Google');
    handler.buildMap({ provider: {}, internal: {id: 'map'}}, function(){
    markers = handler.addMarkers(&lt;%=raw @hash.to_json %&gt;);
    handler.bounds.extendWith(markers);
    handler.fitMapToBounds();
    handler.getMap().setZoom(12);
    }); &lt;/script&gt; 
  </code></pre>
  
  <p>Thanks for the help!</p>