diff --git a/L.PixiOverlay.js b/L.PixiOverlay.js index 0440606a4..9db58d81d 100644 --- a/L.PixiOverlay.js +++ b/L.PixiOverlay.js @@ -388,7 +388,6 @@ }; pixiOverlayClass.onRemove = function () { - this._map = null; var parent = this._container.parentNode; if (parent) { parent.removeChild(this._container); @@ -397,6 +396,7 @@ for (var evt in events) { this._map.off(evt, events[evt], this); } + this._map = null; }; pixiOverlayClass.destroy = function () {