itowns icon indicating copy to clipboard operation
itowns copied to clipboard

Wrong fetching vector data in ColorLayer

Open gchoqueux opened this issue 4 years ago • 0 comments

Sometimes, the Feature used to rasterize a ColorLayer texture haven't correct zoom/level.

Example with ColorLayer and VectorTileSource.

error zoom data vector

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

gchoqueux avatar Oct 02 '20 16:10 gchoqueux