Deprecate the imageSmoothing option for sources
This commit is contained in:
@@ -32,7 +32,7 @@ class ReprojImage extends ImageBase {
|
||||
* @param {number} pixelRatio Pixel ratio.
|
||||
* @param {FunctionType} getImageFunction
|
||||
* Function returning source images (extent, resolution, pixelRatio).
|
||||
* @param {object} [opt_contextOptions] Properties to set on the canvas context.
|
||||
* @param {boolean} interpolate Use linear interpolation when resampling.
|
||||
*/
|
||||
constructor(
|
||||
sourceProj,
|
||||
@@ -41,7 +41,7 @@ class ReprojImage extends ImageBase {
|
||||
targetResolution,
|
||||
pixelRatio,
|
||||
getImageFunction,
|
||||
opt_contextOptions
|
||||
interpolate
|
||||
) {
|
||||
const maxSourceExtent = sourceProj.getExtent();
|
||||
const maxTargetExtent = targetProj.getExtent();
|
||||
@@ -124,9 +124,9 @@ class ReprojImage extends ImageBase {
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {object}
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.contextOptions_ = opt_contextOptions;
|
||||
this.interpolate_ = interpolate;
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -191,7 +191,7 @@ class ReprojImage extends ImageBase {
|
||||
],
|
||||
0,
|
||||
undefined,
|
||||
this.contextOptions_
|
||||
this.interpolate_
|
||||
);
|
||||
}
|
||||
this.state = sourceState;
|
||||
|
||||
+5
-10
@@ -39,7 +39,7 @@ class ReprojTile extends Tile {
|
||||
* Function returning source tiles (z, x, y, pixelRatio).
|
||||
* @param {number} [opt_errorThreshold] Acceptable reprojection error (in px).
|
||||
* @param {boolean} [opt_renderEdges] Render reprojection edges.
|
||||
* @param {object} [opt_contextOptions] Properties to set on the canvas context.
|
||||
* @param {boolean} [opt_interpolate] Use linear interpolation when resampling.
|
||||
*/
|
||||
constructor(
|
||||
sourceProj,
|
||||
@@ -53,9 +53,9 @@ class ReprojTile extends Tile {
|
||||
getTileFunction,
|
||||
opt_errorThreshold,
|
||||
opt_renderEdges,
|
||||
opt_contextOptions
|
||||
opt_interpolate
|
||||
) {
|
||||
super(tileCoord, TileState.IDLE);
|
||||
super(tileCoord, TileState.IDLE, {interpolate: !!opt_interpolate});
|
||||
|
||||
/**
|
||||
* @private
|
||||
@@ -63,12 +63,6 @@ class ReprojTile extends Tile {
|
||||
*/
|
||||
this.renderEdges_ = opt_renderEdges !== undefined ? opt_renderEdges : false;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {object}
|
||||
*/
|
||||
this.contextOptions_ = opt_contextOptions;
|
||||
|
||||
/**
|
||||
* @private
|
||||
* @type {number}
|
||||
@@ -272,6 +266,7 @@ class ReprojTile extends Tile {
|
||||
const targetExtent = this.targetTileGrid_.getTileCoordExtent(
|
||||
this.wrappedTileCoord_
|
||||
);
|
||||
|
||||
this.canvas_ = renderReprojected(
|
||||
width,
|
||||
height,
|
||||
@@ -284,7 +279,7 @@ class ReprojTile extends Tile {
|
||||
sources,
|
||||
this.gutter_,
|
||||
this.renderEdges_,
|
||||
this.contextOptions_
|
||||
this.interpolate
|
||||
);
|
||||
|
||||
this.state = TileState.LOADED;
|
||||
|
||||
Reference in New Issue
Block a user