Merge pull request #1484 from umap-project/layer-events-off
Remove zoom/moeveend events when deleting datalayer
This commit is contained in:
commit
e19508a1df
1 changed files with 2 additions and 0 deletions
|
@ -1116,6 +1116,8 @@ L.U.DataLayer = L.Evented.extend({
|
||||||
this.map.updateDatalayersControl()
|
this.map.updateDatalayersControl()
|
||||||
this.fire('erase')
|
this.fire('erase')
|
||||||
this._leaflet_events_bk = this._leaflet_events
|
this._leaflet_events_bk = this._leaflet_events
|
||||||
|
this.map.off('moveend', this.onMoveEnd, this)
|
||||||
|
this.map.off('zoomend', this.onZoomEnd, this)
|
||||||
this.off()
|
this.off()
|
||||||
this.clear()
|
this.clear()
|
||||||
delete this._loaded
|
delete this._loaded
|
||||||
|
|
Loading…
Reference in a new issue