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

Evaluate feature-state dependent layer IDs on bucket creation #7790

Merged
merged 2 commits into from
Jan 21, 2019
Merged

Conversation

asheemmamoowala
Copy link
Contributor

Fixes #7523.

Alternative solution to #7615.

This fix tries to address a hard to reproduce race condition where the StyleLayer#isStateDependent() method is called before the paint property expressions are available. Ideally, this method would not be called until the layer has been deserialized full from the worker.

The solution proposed here is to move the computation of isStateDependent to the workers during bucket creation. Paint property expressions are expected to be available during this operation. This has the added benefit of removing an extra parse and evaluation of the expressions on the main thread.

  • briefly describe the changes in this PR
  • manually test the debug page

cc @mourner

@mourner mourner merged commit b47e761 into master Jan 21, 2019
@mourner mourner deleted the fix-7523 branch January 21, 2019 15:32
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.

JS errors while zooming (Cannot read property '_values' of undefined)
2 participants