From af643d6b4f00b609328b5fb93fd7a8e6286a1430 Mon Sep 17 00:00:00 2001 From: Wentao Kuang Date: Thu, 2 May 2024 11:12:15 +1200 Subject: [PATCH] fix(landing): Fix the set the tileset id same as style when only style parameter been set. (#3249) #### Motivation We are able to get individual imagery by the `?style=` request parameter only, but this will not populate to the related virtual tilesetId and set default as `ts_aerial`. #### Modification - We can set `layerId` as style id first before set as default `aerial`. #### Checklist - [ ] Tests updated - [ ] Docs updated - [ ] Issue linked in Title --- packages/landing/src/config.map.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/landing/src/config.map.ts b/packages/landing/src/config.map.ts index 399b4df76..ec5739eeb 100644 --- a/packages/landing/src/config.map.ts +++ b/packages/landing/src/config.map.ts @@ -123,7 +123,7 @@ export class MapConfig extends Emitter { const urlParams = new URLSearchParams(search); const style = urlParams.get('s') ?? urlParams.get('style'); const config = urlParams.get('c') ?? urlParams.get('config'); - const layerId = urlParams.get('i') ?? 'aerial'; + const layerId = urlParams.get('i') ?? style ?? 'aerial'; const date = this.getDateRangeFromUrl(urlParams); if (this.filter.date.before !== date.before) { this.filter.date = date;