Add opaque and transition options to GeoTIFF source

This commit is contained in:
Andreas Hocevar
2021-08-27 19:46:49 +02:00
parent 64ea2a56da
commit 14371a5462
+5
View File
@@ -147,6 +147,9 @@ function getMaxForDataType(array) {
* sources, one with 3 bands and {@link import("./GeoTIFF.js").SourceInfo nodata} configured, and * sources, one with 3 bands and {@link import("./GeoTIFF.js").SourceInfo nodata} configured, and
* another with 1 band, the resulting data tiles will have 5 bands: 3 from the first source, 1 alpha * another with 1 band, the resulting data tiles will have 5 bands: 3 from the first source, 1 alpha
* band from the first source, and 1 band from the second source. * band from the first source, and 1 band from the second source.
* @property {boolean} [opaque=false] Whether the layer is opaque.
* @property {number} [transition=250] Duration of the opacity transition for rendering.
* To disable the opacity transition, pass `transition: 0`.
*/ */
/** /**
@@ -163,6 +166,8 @@ class GeoTIFFSource extends DataTile {
state: State.LOADING, state: State.LOADING,
tileGrid: null, tileGrid: null,
projection: null, projection: null,
opaque: options.opaque,
transition: options.transition,
}); });
/** /**