Deprecate the imageSmoothing option for sources

This commit is contained in:
Tim Schaub
2021-12-27 12:25:11 -07:00
parent 8d8632bff7
commit e2883fb658
48 changed files with 538 additions and 191 deletions

View File

@@ -34,7 +34,7 @@ const map = new Map({
}),
});
const imageSmoothing = document.getElementById('imageSmoothing');
const interpolate = document.getElementById('interpolate');
function setSource() {
const source = new Static({
@@ -44,10 +44,10 @@ function setSource() {
crossOrigin: '',
projection: 'EPSG:27700',
imageExtent: imageExtent,
imageSmoothing: imageSmoothing.checked,
interpolate: interpolate.checked,
});
imageLayer.setSource(source);
}
setSource();
imageSmoothing.addEventListener('change', setSource);
interpolate.addEventListener('change', setSource);