changelog/v6.10.0.md
Just in time for the new year, the 6.10 release brings another great batch of features and fixes for your OpenLayers applications.
You can now update the style for your WebGL tile layers with layer.setStyle(). Keep in mind that it is more efficient to use style variables if you want to adjust styling on every render frame. However, in cases where you want to completely reconfigure the style, you can use the new layer.setStyle() method.
Additional WebGL tile layer rendering enhancements:
palette operator was added that allows styling raster data based on a colormap.band operator accepts expressions for the band number (in addition to numeric literals) – allowing for bands to be set by user provided style variables, for example.prerender, postrender, precompose and postcompose events with access to the WebGL rendering context.The Mapbox vector layer now works more easily with other vector tile providers. In addition, vector tile layers can now be configured with a background color.
interpolate option for sourcesSources now have an interpolate option. This option controls whether data from the source is interpolated when resampling.
For ol/source/DataTile sources, the default is interpolate: false. This means that when a data tile source is used with a WebGL tile layer renderer, your style expression will have access to pixel values in the data tiles without interpolation. If this option is set to true, linear interpolation will be used when over- or under-sampling the data.
imageSmoothing option for sourcesThe imageSmoothing option for sources has been deprecated and will be removed in the next major release. Use the interpolate option instead.
// if you were using `imageSmoothing`
const before = new TileSource({
imageSmoothing: false
});
// use the `interpolate` option instead
const after = new TileSource({
interpolate: false
});
See below for more features and fixes.