Remove zoom/moeveend events when deleting datalayer
This commit is contained in:
parent
417f1b9d08
commit
5f8147c274
1 changed files with 2 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue