Google Maps panTo conflicts with addListener
<p>I have a function that recenters the map around the marker when clicked. </p>

<pre><code>google.maps.event.addListener(marker, 'click', function() {
  map.panTo(marker.getPosition());
});
</code></pre>

<p>However, this obviously affects the addListener I have when getting the markers:</p>

<pre><code>google.maps.event.addListener(map, 'idle', function() {
  $.get("/map.json", function(galleries) {
    var bounds = map.getBounds();
    for (var i = 0; i &lt; galleries.length; i++) {
      var latitude = galleries[i].latitude;
      var longitude = galleries[i].longitude;
      var position = new google.maps.LatLng(latitude, longitude)
      if (bounds.contains(position)){
        bindInfobox(map, galleries[i]);
      }
    }
});
</code></pre>

<p>Is there a way to make an exception to the addListener, or another easy way around this? Thanks!</p>