remove deprecated imageSmoothing

This commit is contained in:
mike-000
2022-08-03 11:43:04 +01:00
parent aee389e2b7
commit 27a9f056e0
28 changed files with 20 additions and 203 deletions
+1 -8
View File
@@ -87,7 +87,6 @@ const ProviderConfig = {
/**
* @typedef {Object} Options
* @property {number} [cacheSize] Initial tile cache size. Will auto-grow to hold at least the number of tiles in the viewport.
* @property {boolean} [imageSmoothing=true] Deprecated. Use the `interpolate` option instead.
* @property {boolean} [interpolate=true] Use interpolated values when resampling. By default,
* linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
* @property {string} layer Layer name.
@@ -121,12 +120,6 @@ class Stamen extends XYZ {
* @param {Options} options Stamen options.
*/
constructor(options) {
let interpolate =
options.imageSmoothing !== undefined ? options.imageSmoothing : true;
if (options.interpolate !== undefined) {
interpolate = options.interpolate;
}
const i = options.layer.indexOf('-');
const provider = i == -1 ? options.layer : options.layer.slice(0, i);
const providerConfig = ProviderConfig[provider];
@@ -145,7 +138,7 @@ class Stamen extends XYZ {
attributions: ATTRIBUTIONS,
cacheSize: options.cacheSize,
crossOrigin: 'anonymous',
interpolate: interpolate,
interpolate: options.interpolate,
maxZoom:
options.maxZoom != undefined ? options.maxZoom : providerConfig.maxZoom,
minZoom: