function addInterpolatedMarkers(map, points) {
  // Remove previous circleMarkers
  circleMarkers.forEach((marker) => map.removeLayer(marker));
  circleMarkers = [];

  const [start, end] = points.map((p) => L.latLng(p[0], p[1]));
  const totalDistance = start.distanceTo(end);
  const zoomLevel = map.getZoom();

  // Base step distance
  const baseStepDistance = 6;
  // Adjust step distance based on zoom level (higher zoom -> denser markers)
  const stepDistance = baseStepDistance / Math.pow(1.7, zoomLevel - 20);
  const numMarkers = Math.max(1, Math.floor(totalDistance / stepDistance));

  for (let i = 1; i <= numMarkers; i++) {
    const lat = start.lat + (i / (numMarkers + 1)) * (end.lat - start.lat);
    const lng = start.lng + (i / (numMarkers + 1)) * (end.lng - start.lng);

    const circleMarker = L.circleMarker([lat, lng], {
      radius: 6,
      fillColor: "#ff4800",
      fillOpacity: 1,
      stroke: false,
    }).addTo(map);

    circleMarkers.push(circleMarker);
  }
}
Draw dynamic circles between two points