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
StyleLayers are shared between WorkerTiles, via the worker StyleLayerIndex. But StyleLayers contain state consisting of the evaluated result of style properties at a certain zoom level, and WorkerTiles may have different zoom levels.
Currently, we avoid any issues that this shared state could cause by carefully calling StyleLayer#recalculate at the entry point to every async callback in WorkerTile. But this is relatively fragile and error prone, and also requires reevaluation of previously-evaluated properties.
A better solution would be to have each WorkerTile call StyleLayer#recalculate once for each necessary layer, and store the logical result state independently of any other WorkerTiles. This would likely require a significant refactor of the internals of style recalculation (refs #2739, #3044).
The text was updated successfully, but these errors were encountered:
I'm noticing a bug where Map#queryRenderedFeatures throws an AssertionError: false === true at lower zoom levels on my custom layer. When I zoom in closer on the map and try again, it is able to get the features from my custom layer no problem. It's hard to reproduce, so I haven't filed a bug for it-- but this might be related?
What areas of the library are affected by this issue?
I don't believe this is causing any bugs currently -- this is a refactoring issue noting how we could improve the code in the future. An assertion error in queryRenderedFeatures sounds like a separate issue.
StyleLayer
s are shared betweenWorkerTile
s, via the workerStyleLayerIndex
. ButStyleLayer
s contain state consisting of the evaluated result of style properties at a certain zoom level, andWorkerTile
s may have different zoom levels.Currently, we avoid any issues that this shared state could cause by carefully calling
StyleLayer#recalculate
at the entry point to every async callback inWorkerTile
. But this is relatively fragile and error prone, and also requires reevaluation of previously-evaluated properties.A better solution would be to have each
WorkerTile
callStyleLayer#recalculate
once for each necessary layer, and store the logical result state independently of any otherWorkerTile
s. This would likely require a significant refactor of the internals of style recalculation (refs #2739, #3044).The text was updated successfully, but these errors were encountered: