From f2472b780128c529071f06ca611468d26261376c Mon Sep 17 00:00:00 2001 From: Duck Date: Wed, 15 Sep 2021 09:22:18 -0700 Subject: [PATCH] Allow DataTile source to include more than four bands. --- src/ol/source/DataTile.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ol/source/DataTile.js b/src/ol/source/DataTile.js index cc1acc26aa..7f8e570b3c 100644 --- a/src/ol/source/DataTile.js +++ b/src/ol/source/DataTile.js @@ -26,6 +26,7 @@ import {getUid} from '../util.js'; * @property {number} [tilePixelRatio] Tile pixel ratio. * @property {boolean} [wrapX=true] Render tiles beyond the antimeridian. * @property {number} [transition] Transition time when fading in new tiles (in miliseconds). + * @property {number} [bandCount=4] Number of bands represented in the data. */ /** @@ -81,7 +82,7 @@ class DataTileSource extends TileSource { /** * @type {number} */ - this.bandCount = 4; // assume RGBA + this.bandCount = options.bandCount === undefined ? 4 : options.bandCount; // assume RGBA if undefined } /**