Set reprojection canvas context options
Add example of disabling image smoothing Add test for reprojection context options
This commit is contained in:
@@ -47,6 +47,8 @@ import {createXYZ, extentFromProjection} from '../tilegrid.js';
|
||||
* Useful when the server does not support CORS..
|
||||
* @property {number} [reprojectionErrorThreshold=0.5] Maximum allowed reprojection error (in pixels).
|
||||
* Higher values can increase reprojection performance, but decrease precision.
|
||||
* @property {object} [reprojectionContextOptions] Optional properties to set on the canvas context used
|
||||
* for reprojection. For example specify `{imageSmoothingEnabled: false}` to disable image smoothing.
|
||||
* @property {Config} [tileJSON] TileJSON configuration for this source.
|
||||
* If not provided, `url` must be configured.
|
||||
* @property {import("../Tile.js").LoadFunction} [tileLoadFunction] Optional function to load a tile given a URL. The default is
|
||||
@@ -80,6 +82,7 @@ class TileJSON extends TileImage {
|
||||
crossOrigin: options.crossOrigin,
|
||||
projection: getProjection('EPSG:3857'),
|
||||
reprojectionErrorThreshold: options.reprojectionErrorThreshold,
|
||||
reprojectionContextOptions: options.reprojectionContextOptions,
|
||||
state: SourceState.LOADING,
|
||||
tileLoadFunction: options.tileLoadFunction,
|
||||
wrapX: options.wrapX !== undefined ? options.wrapX : true,
|
||||
|
||||
Reference in New Issue
Block a user