title: Leaflet panTo (or setview) function?
body: <p>I want to create a panTo -function. When I click a link the map pans to the coordinates. But im not sure how to pass the value to the function. I'm starting with giving the link the Pointfield (pt) value like this:</p>
  
  <pre><code>&lt;a href="#" class="marker" value="{{ mymodel.pt }}"&gt;Link&lt;/a&gt;
  </code></pre>
  
  <p>Then I've been trying this:</p>
  
  <pre><code>$("#dialog").on("click", ".marker", function(e) {
      e.preventDefault();
      map.panTo($(this).attr("value"));
      });
  </code></pre>
  
  <p>That didn't work. I think it's a scope-issue where the function cant read the 'map' variable because it's not under the initial map script.</p>
  
  <p>So my next idea is to create a "panTo"- function and place it under the inital map script (which would be the right scope) and call that function from the click event instead. Not sure it would work but Im wondering how to pass it the "value" from the link?</p>
  
  <p>Thanks for your answers!</p>