itowns
itowns copied to clipboard
Wrong fetching vector data in ColorLayer
Sometimes, the Feature used to rasterize a ColorLayer
texture haven't correct zoom/level
.
Example with ColorLayer and VectorTileSource.
Context
Source with vector data in ColorLayer
.
Steps to Reproduce (for bugs)
- Start a viewer with low range.
- Change quickly in inferior zoom level, in the viewer.
Solution
In update strategy node.pendingSubdivision == true
avoids the update.
This mechanism doesn't work with vector data to texture because feature zoom and texture are different.
in the code below, !layer.source.isVectorSource
could introduce the bug.
https://github.com/iTowns/itowns/blob/60cfa44e814f1bb24f30dab4c4a34f4aa12bdded/src/Process/LayeredMaterialNodeProcessing.js#L131-L137