Skip to content

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.

[fix] text outlines are barely visible after upgrade to deck 8.9 (#2353)

Igor Dykhta357f77a83624
diff --git a/src/constants/src/default-settings.ts b/src/constants/src/default-settings.ts
index 70887c4bd..f8c8184dc 100644
--- a/src/constants/src/default-settings.ts
+++ b/src/constants/src/default-settings.ts
@@ -1127,6 +1127,11 @@ export const MAP_CONTROLS = keyMirror({
*/
export const PROJECTED_PIXEL_SIZE_MULTIPLIER = 2 / 3;
+/**
+ * Maximum value for text outline width
+ */
+export const TEXT_OUTLINE_MULTIPLIER = 5;
+
export const dataTestIds: Record<string, string> = {
infoIcon: 'info-icon',
warningIcon: 'warning-icon',
diff --git a/src/layers/src/base-layer.ts b/src/layers/src/base-layer.ts
index 02d82730e..2541e9801 100644
--- a/src/layers/src/base-layer.ts
+++ b/src/layers/src/base-layer.ts
@@ -46,7 +46,8 @@ import {
UNKNOWN_COLOR_KEY,
DEFAULT_HIGHLIGHT_COLOR,
DEFAULT_LAYER_LABEL,
- PROJECTED_PIXEL_SIZE_MULTIPLIER
+ PROJECTED_PIXEL_SIZE_MULTIPLIER,
+ TEXT_OUTLINE_MULTIPLIER
} from '@kepler.gl/constants';
import {
@@ -1370,7 +1371,7 @@ class Layer {
getTextAnchor: textLabel[i].anchor,
getAlignmentBaseline: textLabel[i].alignment,
getColor: textLabel[i].color,
- outlineWidth: textLabel[i].outlineWidth,
+ outlineWidth: textLabel[i].outlineWidth * TEXT_OUTLINE_MULTIPLIER,
outlineColor: textLabel[i].outlineColor,
background,
getBackgroundColor: textLabel[i].backgroundColor,