Skip to content

Commit 677cfd8

Browse files
committed
[fix] fix for custom color scales with tile layer
Signed-off-by: Ihor Dykhta <[email protected]>
1 parent f9c52e5 commit 677cfd8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/utils/src/data-scale-utils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,11 @@ export function initializeLayerColorMap(layer: Layer, visualChannel: VisualChann
327327
layer
328328
});
329329

330-
const colorBreaks = getLegendOfScale({scale, scaleType, fieldType: field.type});
331-
330+
const colorBreaks = getLegendOfScale({
331+
scale: scale?.byZoom ? scale(0) : scale,
332+
scaleType,
333+
fieldType: field.type
334+
});
332335
return colorBreaksToColorMap(colorBreaks);
333336
}
334337

0 commit comments

Comments
 (0)