title: Marker on the center of map after drag
body: <p>I implement google map on my website. User can drag the marker and get coordinates. It's working fine but requirement is that when user drag marker, after drag marker should come on the center of the map window or if user drag map, then for this case marker also come to the center of map window.</p>
  
  <p>I have the following code which is working for only drag marker on the map, 
  but I don't know where to add the function or code that move the marker on the center of map window after drag.</p>
  
  <p>That code is written below:</p>
  
  <pre><code>google.maps.event.addListener(myMarker, 'dragend', function (evt) {
      document.getElementById('dragStatus').innerHTML = '&lt;p&gt; Current Lat: ' + evt.latLng.lat().toFixed(4) + ' Current Lng: ' + evt.latLng.lng().toFixed(4) + '&lt;/p&gt;';
      var point = marker.getPosition();
         map.panTo(point);
  });
  
  google.maps.event.addListener(myMarker, 'dragstart', function (evt) {
      //-------------
      //------------
  });
  </code></pre>
  
  <p><a href="http://jsfiddle.net/ANJYR/6xq6pujk/" rel="nofollow">http://jsfiddle.net/ANJYR/6xq6pujk/</a></p>