src/layersupport.js
function (layer, operationType) {
		var duration = this.options.singleAddRemoveBufferDuration,
		    fn;

		if (duration > 0) {
			this._singleAddRemoveBuffer.push({
				type: operationType,
				layer: layer
			});

			if (!this._singleAddRemoveBufferTimeout) {
				fn = L.bind(this._processSingleAddRemoveBuffer, this);

				this._singleAddRemoveBufferTimeout = setTimeout(fn, duration);
			}
		} else { // If duration <= 0, process synchronously.
			this[operationType](layer);
		}
	}
function (layer, operationType) {
		var duration = this.options.singleAddRemoveBufferDuration,
		    fn;

		if (duration > 0) {
			this._singleAddRemoveBuffer.push({
				type: operationType,
				layer: layer
			});

			if (!this._singleAddRemoveBufferTimeout) {
				fn = L.bind(this._processSingleAddRemoveBuffer, this);

				this._singleAddRemoveBufferTimeout = setTimeout(fn, duration);
			}
		} else { // If duration <= 0, process synchronously.
			this[operationType](layer);
		}
	}
function ( layer , operationType ) { var duration = this . options . singleAddRemoveBufferDuration , fn ; if ( duration > 0 ) { this . _singleAddRemoveBuffer . push ( { type : operationType , layer : layer } ) ; if ( ! this . _singleAddRemoveBufferTimeout ) { fn = L . bind ( this . _processSingleAddRemoveBuffer , this ) ; this . _singleAddRemoveBufferTimeout = setTimeout ( fn , duration ) ; } } else { // If duration <= 0, process synchronously. this [ operationType ] ( layer ) ; } }
Do not restore the original map methods when removing the group from it. Leaving them as-is does not harm, whereas restoring the original ones may kill the functionality of potential other LayerSupport groups on the same map. Therefore we do not need to override onRemove.
Do not restore the original map methods when removing the group from it . Leaving them as - is does not harm whereas restoring the original ones may kill the functionality of potential other LayerSupport groups on the same map . Therefore we do not need to override onRemove .