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

Changing tiles #16

Open
maeneak opened this issue May 26, 2019 · 3 comments
Open

Changing tiles #16

maeneak opened this issue May 26, 2019 · 3 comments

Comments

@maeneak
Copy link

maeneak commented May 26, 2019

What is the recommended way to change tiles (json) at runtime? I have tried removing the layer and re-creating it but i end up with gl context is null errors. Im using this in react so its possible its purely a react issue.

@maeneak
Copy link
Author

maeneak commented May 26, 2019

Ok so i had to add an onRemove handler in the particle class and disconnect the Particle class 'move' event from the map.
map.off("move", this.move);

@maeneak
Copy link
Author

maeneak commented May 26, 2019

Actually just adding the line in the 'Layer' onRemove handler did the trick

@learnurban
Copy link

@maeneak Sorry for taking your time. Can you provide the detailed trick method for changing tiles (json) at runtime?

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

No branches or pull requests

2 participants