eurostat/gridviz

Zoomed data-grid shows gaps

Opened this issue · 1 comments

Have to investigate further and create example
this is 100m-grid-data with wms background.

works as expected in this zoom level
adjacent100m

same area as above but zoomed in further. results in data grid showing gaps:
zoomed100m

I also observed this bug here: https://eurostat.github.io/gridviz/examples/styles/squarecolorwgl.html
It happens for the SquareColorWGLStyle style when the square get very large. I could not find a way to solve it. It seems there is a rounding happening when transferring data to webgl renderer... I will try to investigate again.

A workaround in the meantime is to use shapecolorsize-style which is based on canvas, only from the zoom levels were the bug appears. It is possible to define minZoom and maxZoom at style level. If the shift from webgl to canvas should happen at zoom level 5645, just define the layer styles stack as:

[
new gviz.SquareColorWGLStyle({
...
minZoom : 5645
}),
new gviz.ShapeColorSizeStyle({
...
maxZoom : 5645
})
]

In such a way, webGL will be used above zoom 5645, and canvas below.