Skip to content

Commit

Permalink
fix(landing): Fix the set the tileset id same as style when only styl…
Browse files Browse the repository at this point in the history
…e 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
  • Loading branch information
Wentao-Kuang authored May 1, 2024
1 parent 766f92b commit af643d6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/landing/src/config.map.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export class MapConfig extends Emitter<MapConfigEvents> {
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;
Expand Down

0 comments on commit af643d6

Please sign in to comment.