Merge pull request #1369 from umap-project/heatlayer-map
Add back HeatLayer._map reference check
This commit is contained in:
commit
7bdd56ee9e
1 changed files with 8 additions and 0 deletions
|
@ -374,6 +374,14 @@ L.U.Layer.Heat = L.HeatLayer.extend({
|
||||||
this._updateOptions()
|
this._updateOptions()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
redraw: function () {
|
||||||
|
// setlalngs call _redraw through setAnimFrame, thus async, so this
|
||||||
|
// can ends with race condition if we remove the layer very faslty after.
|
||||||
|
// TODO: PR in upstream Leaflet.heat
|
||||||
|
if (!this._map) return
|
||||||
|
L.HeatLayer.prototype.redraw.call(this)
|
||||||
|
},
|
||||||
|
|
||||||
_redraw: function () {
|
_redraw: function () {
|
||||||
// Import patch from https://github.com/Leaflet/Leaflet.heat/pull/78
|
// Import patch from https://github.com/Leaflet/Leaflet.heat/pull/78
|
||||||
// Remove me when this get merged and released.
|
// Remove me when this get merged and released.
|
||||||
|
|
Loading…
Reference in a new issue