You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While looking at #5093, I discovered that current master has a problem when layers are removed from the canvas renderer.
When removing a layer, the removed layer's _project method is sometimes called even though it's removed, causing an exception since the layer's this._map is not set.
Click the map twice, the second time you will get an exception and the map will not update properly.
I believe the problem lies in the _requestRedraw's asynchronous behaviour: in this particular case, the redraw is postponed until after the fitBounds call, so the layer has not yet been removed from the renderer's _layers (this is done in draw when the clearflag is set).
I believe this is caused by the refactor in #5054.
The text was updated successfully, but these errors were encountered:
While looking at #5093, I discovered that current
master
has a problem when layers are removed from the canvas renderer.When removing a layer, the removed layer's
_project
method is sometimes called even though it's removed, causing an exception since the layer'sthis._map
is not set.Example is this modified playground from #5093: http://playground-leaflet.rhcloud.com/firu/edit?html,output
Click the map twice, the second time you will get an exception and the map will not update properly.
I believe the problem lies in the
_requestRedraw
's asynchronous behaviour: in this particular case, the redraw is postponed until after thefitBounds
call, so the layer has not yet been removed from the renderer's_layers
(this is done in draw when theclear
flag is set).I believe this is caused by the refactor in #5054.
The text was updated successfully, but these errors were encountered: