fix GridLayer move event handler, fixes #3522

This commit is contained in:
Alex Fedosov 2015-06-09 21:19:32 +06:00
parent 79105f78a7
commit b31a1e8be6

View File

@ -104,7 +104,11 @@ L.GridLayer = L.Layer.extend({
if (!this.options.updateWhenIdle) {
// update tiles on move, but not more often than once per given interval
events.move = L.Util.throttle(this._onMoveEnd, this.options.updateInterval, this);
if (!this._onMove) {
this._onMove = L.Util.throttle(this._onMoveEnd, this.options.updateInterval, this);
}
events.move = this._onMove;
}
if (this._zoomAnimated) {