title: How to change Google Map Center by clicking a button
body: <p>I am using Google Map API v3 and jQuery 1.11.0.</p>
  
  <p>I have a Google Map in the following div:</p>
  
  <pre><code>&lt;div id="googleMap" class="map_div"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>The <strong>map.js</strong> is outside html file, it is linked.</p>
  
  <p>Now I have a button in another part of the html (<strong>outside map</strong>) like this:</p>
  
  <pre><code>&lt;button id="3"&gt;Change center&lt;/button&gt;
  </code></pre>
  
  <p>Now I want to add a on click event which will change the center of the map to new latitude and longitude.</p>
  
  <p>So, I have JavaScript in HTML like this:</p>
  
  <pre><code>&lt;script&gt;
      $(document).ready(function()
      {
          $("#3").click(function(){
              var center = new google.maps.LatLng(10.23,123.45);
              map.panTo(center);
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>Can anyone help me please? Thanks in advance for helping.</p>