From 5f8147c274aea5fac942f521dbe5eff4363e4664 Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Fri, 22 Dec 2023 18:45:21 +0100 Subject: [PATCH] Remove zoom/moeveend events when deleting datalayer --- umap/static/umap/js/umap.layer.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/umap/static/umap/js/umap.layer.js b/umap/static/umap/js/umap.layer.js index 4c671b7f..e316233d 100644 --- a/umap/static/umap/js/umap.layer.js +++ b/umap/static/umap/js/umap.layer.js @@ -1116,6 +1116,8 @@ L.U.DataLayer = L.Evented.extend({ this.map.updateDatalayersControl() this.fire('erase') this._leaflet_events_bk = this._leaflet_events + this.map.off('moveend', this.onMoveEnd, this) + this.map.off('zoomend', this.onZoomEnd, this) this.off() this.clear() delete this._loaded