diff --git a/L.CanvasLayer.js b/L.CanvasLayer.js index 03cee50..cb3cac6 100644 --- a/L.CanvasLayer.js +++ b/L.CanvasLayer.js @@ -93,6 +93,9 @@ L.CanvasLayer = (L.Layer ? L.Layer : L.Class).extend({ var del = this._delegate || this; del.onLayerWillUnmount && del.onLayerWillUnmount(); // -- callback + if (this._frame) { + L.Util.cancelAnimFrame(this._frame); + } map.getPanes().overlayPane.removeChild(this._canvas);