Skip to content

Commit 04c5f2c

Browse files
committed
Fix: rescaling titiler cogs only if transform is true
1 parent 820267c commit 04c5f2c

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/essence/Basics/Layers_/leaflet-tilelayer-middleware.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,11 @@ var colorFilterExtension = {
4343
}exitwhenfull=false&skipcovered=false`
4444
}
4545

46-
if (this.options.cogMin != null && this.options.cogMax != null) {
46+
if (
47+
this.options.cogTransform === true &&
48+
this.options.cogMin != null &&
49+
this.options.cogMax != null
50+
) {
4751
url += `${url.indexOf('?') === -1 ? '?' : '&'}rescale=[${
4852
this.options.currentCogMin != null
4953
? this.options.currentCogMin

src/essence/Basics/Map_/Map_.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,7 @@ async function makeTileLayer(layerObj) {
12031203
typeof layerObj.time === 'undefined'
12041204
? null
12051205
: layerObj.time.customTimes,
1206+
cogTransform: layerObj.cogTransform,
12061207
cogMin: layerObj.cogMin,
12071208
currentCogMin: layerObj.currentCogMin,
12081209
cogMax: layerObj.cogMax,

0 commit comments

Comments
 (0)