From 14371a54625544cd801a6fdd3168481d61f07990 Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Fri, 27 Aug 2021 19:46:49 +0200 Subject: [PATCH] Add opaque and transition options to GeoTIFF source --- src/ol/source/GeoTIFF.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/ol/source/GeoTIFF.js b/src/ol/source/GeoTIFF.js index af20f311d2..15c56576c3 100644 --- a/src/ol/source/GeoTIFF.js +++ b/src/ol/source/GeoTIFF.js @@ -147,6 +147,9 @@ function getMaxForDataType(array) { * 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 * 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, tileGrid: null, projection: null, + opaque: options.opaque, + transition: options.transition, }); /**