title: Leaflet: Add a link to the markers
body: <p>Pretty simple question: How can I make the map markers in Leaflet clickable and route the user to an other page? Every marker has its own page.</p>
  
  <p>I've tried the following without success; somehow all the markers point to the same page, which is the last assigned URI.</p>
  
  <pre><code>var markers = [
      { coords: [51.505, -0.09], uri: '/some-page' },
      ...
  ];
  
  for(x in markers)
  {
      L.marker(markers[x].coords).on('click', function() {
          window.location = markers[x].uri;
      }).addTo(map);
  }
  </code></pre>
  
  <p>This issue is really driving me nuts.</p>