Deprecate the imageSmoothing option for sources
This commit is contained in:
@@ -32,7 +32,9 @@ import {
|
||||
* @property {Array<number>} [resolutions] Resolutions.
|
||||
* If specified, requests will be made for these resolutions only.
|
||||
* @property {import("../Image.js").LoadFunction} [imageLoadFunction] Optional function to load an image given a URL.
|
||||
* @property {boolean} [imageSmoothing=true] Enable image smoothing.
|
||||
* @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 {Object} [params] Additional parameters.
|
||||
*/
|
||||
|
||||
@@ -48,8 +50,14 @@ class ImageMapGuide extends ImageSource {
|
||||
* @param {Options} options ImageMapGuide options.
|
||||
*/
|
||||
constructor(options) {
|
||||
let interpolate =
|
||||
options.imageSmoothing !== undefined ? options.imageSmoothing : true;
|
||||
if (options.interpolate !== undefined) {
|
||||
interpolate = options.interpolate;
|
||||
}
|
||||
|
||||
super({
|
||||
imageSmoothing: options.imageSmoothing,
|
||||
interpolate: interpolate,
|
||||
projection: options.projection,
|
||||
resolutions: options.resolutions,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user