function (layersArray) {
    var i, l, m,
      fg = this._featureGroup,
      npg = this._nonPointGroup;

    if (!this._map) {
      for (i = 0, l = layersArray.length; i < l; i++) {
        m = layersArray[i];
        this._arraySplice(this._needsClustering, m);
        npg.removeLayer(m);
      }
      return this;
    }

    for (i = 0, l = layersArray.length; i < l; i++) {
      m = layersArray[i];

      if (!m.__parent) {
        npg.removeLayer(m);
        continue;
      }

      this._removeLayer(m, true, true);

      if (fg.hasLayer(m)) {
        fg.removeLayer(m);
        if (m.setOpacity) {
          m.setOpacity(1);
        }
      }
    }

    //Fix up the clusters and markers on the map
    this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds);

    fg.eachLayer(function (c) {
      if (c instanceof L.MarkerCluster) {
        c._updateIcon();
      }
    });

    return this;
  }
function (layersArray) {
    var i, l, m,
      fg = this._featureGroup,
      npg = this._nonPointGroup;

    if (!this._map) {
      for (i = 0, l = layersArray.length; i < l; i++) {
        m = layersArray[i];
        this._arraySplice(this._needsClustering, m);
        npg.removeLayer(m);
      }
      return this;
    }

    for (i = 0, l = layersArray.length; i < l; i++) {
      m = layersArray[i];

      if (!m.__parent) {
        npg.removeLayer(m);
        continue;
      }

      this._removeLayer(m, true, true);

      if (fg.hasLayer(m)) {
        fg.removeLayer(m);
        if (m.setOpacity) {
          m.setOpacity(1);
        }
      }
    }

    //Fix up the clusters and markers on the map
    this._topClusterLevel._recursivelyAddChildrenToMap(null, this._zoom, this._currentShownBounds);

    fg.eachLayer(function (c) {
      if (c instanceof L.MarkerCluster) {
        c._updateIcon();
      }
    });

    return this;
  }
function ( layersArray ) { var i , l , m , fg = this . _featureGroup , npg = this . _nonPointGroup ; if ( ! this . _map ) { for ( i = 0 , l = layersArray . length ; i < l ; i ++ ) { m = layersArray [ i ] ; this . _arraySplice ( this . _needsClustering , m ) ; npg . removeLayer ( m ) ; } return this ; } for ( i = 0 , l = layersArray . length ; i < l ; i ++ ) { m = layersArray [ i ] ; if ( ! m . __parent ) { npg . removeLayer ( m ) ; continue ; } this . _removeLayer ( m , true , true ) ; if ( fg . hasLayer ( m ) ) { fg . removeLayer ( m ) ; if ( m . setOpacity ) { m . setOpacity ( 1 ) ; } } } //Fix up the clusters and markers on the map this . _topClusterLevel . _recursivelyAddChildrenToMap ( null , this . _zoom , this . _currentShownBounds ) ; fg . eachLayer ( function ( c ) { if ( c instanceof L . MarkerCluster ) { c . _updateIcon ( ) ; } } ) ; return this ; }
Takes an array of markers and removes them in bulk
Takes an array of markers and removes them in bulk