Standard behavior, while zooming in and out in Openlayers, is that the current tile gets resampled and displayed stretched or compressed until the new tile is available. That's how it looks like while zooming in:
Is it possible to change this behavior on layer level so that the old tile is hidden till the new one is loaded? I would like to apply that to ol.layer.Tile and ol.layer.VectorTile layers.
In my usage case I zoom in quite often when selecting features so tiles from low zoom levels get streched quite heavily. I would prefer to make them invisible and show the background color while loading new tiles.
Note: In Openlayers 2 there was a transitionEffect parameter in OpenLayers.Layer.WMS as shown in this example. 'default' value sounds like what I need, also I don't see any difference to 'resize' value...
As a workaround I could think of listening to tileloadstart and tileloadend events and meanwhile set opacity of the whole layer to 0. But I would prefer to see tiles appearing as the get loaded.
transition
insource
? openlayers.org/en/latest/apidoc/ol.source.TileImage.html