js/leaflet.markercluster.js
function (boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel) {
    var childClusters = this._childClusters,
        zoom = this._zoom,
      i, c;

    if (zoomLevelToStart > zoom) { //Still going down to required depth, just recurse to child clusters
      for (i = childClusters.length - 1; i >= 0; i--) {
        c = childClusters[i];
        if (boundsToApplyTo.intersects(c._bounds)) {
          c._recursively(boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel);
        }
      }
    } else { //In required depth

      if (runAtEveryLevel) {
        runAtEveryLevel(this);
      }
      if (runAtBottomLevel && this._zoom === zoomLevelToStop) {
        runAtBottomLevel(this);
      }

      //TODO: This loop is almost the same as above
      if (zoomLevelToStop > zoom) {
        for (i = childClusters.length - 1; i >= 0; i--) {
          c = childClusters[i];
          if (boundsToApplyTo.intersects(c._bounds)) {
            c._recursively(boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel);
          }
        }
      }
    }
  }
function (boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel) {
    var childClusters = this._childClusters,
        zoom = this._zoom,
      i, c;

    if (zoomLevelToStart > zoom) { //Still going down to required depth, just recurse to child clusters
      for (i = childClusters.length - 1; i >= 0; i--) {
        c = childClusters[i];
        if (boundsToApplyTo.intersects(c._bounds)) {
          c._recursively(boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel);
        }
      }
    } else { //In required depth

      if (runAtEveryLevel) {
        runAtEveryLevel(this);
      }
      if (runAtBottomLevel && this._zoom === zoomLevelToStop) {
        runAtBottomLevel(this);
      }

      //TODO: This loop is almost the same as above
      if (zoomLevelToStop > zoom) {
        for (i = childClusters.length - 1; i >= 0; i--) {
          c = childClusters[i];
          if (boundsToApplyTo.intersects(c._bounds)) {
            c._recursively(boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel);
          }
        }
      }
    }
  }
function ( boundsToApplyTo , zoomLevelToStart , zoomLevelToStop , runAtEveryLevel , runAtBottomLevel ) { var childClusters = this . _childClusters , zoom = this . _zoom , i , c ; if ( zoomLevelToStart > zoom ) { //Still going down to required depth, just recurse to child clusters for ( i = childClusters . length - 1 ; i >= 0 ; i -- ) { c = childClusters [ i ] ; if ( boundsToApplyTo . intersects ( c . _bounds ) ) { c . _recursively ( boundsToApplyTo , zoomLevelToStart , zoomLevelToStop , runAtEveryLevel , runAtBottomLevel ) ; } } } else { //In required depth if ( runAtEveryLevel ) { runAtEveryLevel ( this ) ; } if ( runAtBottomLevel && this . _zoom === zoomLevelToStop ) { runAtBottomLevel ( this ) ; } //TODO: This loop is almost the same as above if ( zoomLevelToStop > zoom ) { for ( i = childClusters . length - 1 ; i >= 0 ; i -- ) { c = childClusters [ i ] ; if ( boundsToApplyTo . intersects ( c . _bounds ) ) { c . _recursively ( boundsToApplyTo , zoomLevelToStart , zoomLevelToStop , runAtEveryLevel , runAtBottomLevel ) ; } } } } }
Run the given functions recursively to this and child clusters boundsToApplyTo: a L.LatLngBounds representing the bounds of what clusters to recurse in to zoomLevelToStart: zoom level to start running functions (inclusive) zoomLevelToStop: zoom level to stop running functions (inclusive) runAtEveryLevel: function that takes an L.MarkerCluster as an argument that should be applied on every level runAtBottomLevel: function that takes an L.MarkerCluster as an argument that should be applied at only the bottom level
Run the given functions recursively to this and child clusters boundsToApplyTo : a L . LatLngBounds representing the bounds of what clusters to recurse in to zoomLevelToStart : zoom level to start running functions ( inclusive ) zoomLevelToStop : zoom level to stop running functions ( inclusive ) runAtEveryLevel : function that takes an L . MarkerCluster as an argument that should be applied on every level runAtBottomLevel : function that takes an L . MarkerCluster as an argument that should be applied at only the bottom level