Open maeneak opened 5 years ago
Also added line to remove 'move' hook #16
I'm not sure this is the right way to handle this. In theory the map
and gl
references are no longer valid after onRemove
(and potentially should be allowed to be garbage collected). These references should be re-added when onAdd
gets called again.
So if this is causing errors, the bug is likely somewhere else (i.e. code assuming gl
context is running after onRemove
has been called).
delete commands destroy the gl context causing failure when removing and adding layers to re-create the source.