From 09904b97c46d50087edd2349f40d32ad70b15f2d Mon Sep 17 00:00:00 2001 From: Tawera Manaena Date: Thu, 31 Oct 2024 13:44:27 +1300 Subject: [PATCH] refactor(landing): revise logic for showing labels by default --- packages/landing/src/config.map.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/landing/src/config.map.ts b/packages/landing/src/config.map.ts index 5f925833b..2d0a899fe 100644 --- a/packages/landing/src/config.map.ts +++ b/packages/landing/src/config.map.ts @@ -69,7 +69,7 @@ export class MapConfig extends Emitter { } get isDebug(): boolean { - return this.debug.debug; + return this.debug.debug === true; } /** Map location in WGS84 */ @@ -146,9 +146,9 @@ export class MapConfig extends Emitter { this.layerId = layerId.startsWith('im_') ? layerId.slice(3) : layerId; this.tileMatrix = tileMatrix; if (labels == null) { - this.labels = layerId === 'aerial' && !this.debug.debug; + this.labels = layerId === 'aerial' && this.isDebug === false; } else { - this.labels = labels === 'true'; + this.labels = labels !== 'false'; } if (this.layerId === 'topographic' && this.style == null) this.style = 'topographic';