Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete commands destroy context #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Delete commands destroy context #19

wants to merge 2 commits into from

Conversation

maeneak
Copy link

@maeneak maeneak commented Jun 5, 2019

delete commands destroy the gl context causing failure when removing and adding layers to re-create the source.

@maeneak
Copy link
Author

maeneak commented Jun 5, 2019

Also added line to remove 'move' hook #16

@gampleman
Copy link
Contributor

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants