title: Cannot select markers with Leaflet and Leaflet knn plugin
body: <p>I'm getting a bunch of lat/lng from a database, loop through them and place the markers on the map.</p>
  
  <pre><code>let geoJson = []
  
  for (let i in elements) {
    let element = elements[i],
      ll = L.latLng(element.Location[0], element.Location[1]),
      llArr = { "type": "Point", "coordinates": [element.Location[0], element.Location[1]] }
  
    geoJson.push(llArr) // to have a geoJson for nearest points
  
    L.marker(ll, { icon: createMarkerIcon(element.Category) }).on('click', function (e) {
      info.update({ name: element.Name, tu: element.ThumbsUp, td: element.ThumbsDown, id: element.Id, tags: generateTagsList(element.Tags) })
    }).addTo(map)
  }
  </code></pre>
  
  <p>While doing this I'm also pushing the lat/lng to a geoJson to find the nearest marker of a location later on. Problem is that I am not able to select the <code>L.markers</code> put on the map before. It seems like the points in the geoJson are different elements than the markers.</p>