gridviz icon indicating copy to clipboard operation
gridviz copied to clipboard

Zoomed data-grid shows gaps

Open wahlatlas opened this issue 2 years ago • 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

wahlatlas avatar Jun 19 '23 22:06 wahlatlas

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.

jgaffuri avatar Jun 29 '23 13:06 jgaffuri