title: Google-Maps-for-Rails center map via ajax
body: <p>I'm setting a new marker via ajax and I was wondering how to center the map on the new point with a custom zoom level, I made in this way:</p>
  
  <pre><code>  def geocode
  pos = Gmaps4rails.geocode(params[:address])
  render :update do |page|
      unless pos.blank?
          page &lt;&lt; "$('#poi_latitude').val(#{pos.first[:lat]});"
          page &lt;&lt; "$('#poi_longitude').val(#{pos.first[:lng]});"
          page &lt;&lt; "if (marker != null) { marker.setMap(null); }"
          page &lt;&lt; "var myLatlng = new google.maps.LatLng(#{pos.first[:lat]},#{pos.first[:lng]});"
          page &lt;&lt; "marker = new google.maps.Marker({position: myLatlng, map: Gmaps4Rails.map});"
                      page &lt;&lt; "Gmaps4Rails.map.centerAndZoom(myLatlng, 0);"
  
      end
  end
  </code></pre>
  
  <p>end</p>
  
  <p>but I get an error because the method centerAndZoom is not defined into gmaps4rails.js, should i define it into the js or there is another way?
  Thanks</p>