title: How to pass an argument to a Leaflet event listener?
body: <p>I'm trying to write this function so that clicking on a new item created in a Google map should run a <code>panTo()</code> to the specified <code>latlng</code>. I do not know if <code>addListener</code> is unable to send a parameter to the callback function.</p>
  
  <pre><code>function createLinkToMarker(title, latlng, container) {
      var a = L.DomUtil.create('a', 'link-marker', container);
          a.href='#',
          a.innerHTML = title;
  
      function pan() {//??? why I passing argument(latlng) for each new A element?
          console.log(arguments);
          map.panTo(latlng);
      }
      L.DomEvent
          .addListener(a, 'click', L.DomEvent.stopPropagation)
          .addListener(a, 'click', L.DomEvent.preventDefault)
          .addListener(a, 'click', pan);
      return a;
  }
  </code></pre>