title: Marker inside radius with Leaflet geodetic error
body: <p>I have many markers in a leaflet map. I need to be able to draw a circle and show only the markers that are contained in that circle. </p>
  
  <p>I was calculating the distance from the marker to the center of the circle and if it was less than the circle radius I would add the marker:</p>
  
  <pre><code>layer.getLatLng().distanceTo(marker.getLatLng()) &lt; layer.getRadius();
  </code></pre>
  
  <p>Using this formula some markers that aren't really inside the circle are added. After testing and researching I found this is because of the map projections complications. <a href="https://github.com/Leaflet/Leaflet/issues/4917" rel="nofollow noreferrer">https://github.com/Leaflet/Leaflet/issues/4917</a>.</p>
  
  <p>I tried using the leaflet-geodesy library replacing the regular circle with a "geodetic" one, but then I don't have a circle that I can easily edit moving its center and changing the radius but a polygon with many points that is impossible to keep handling like a circle.</p>
  
  <p>What I would like to do, if possible, is stick to the simple projected circle, but find a formula to calculate if a marker is inside this projection. I tried thinking about the geometry of the lat/lng grid and taking the circle radius adjust it depending on the center lat, but I haven't been able to find the right formula and I keep getting markers that are close to the circle but still outside of it.</p>