Skip to content

Commit

Permalink
fix(landing): base url should include config (#2452)
Browse files Browse the repository at this point in the history
* fix(landing): base url should include config

* refactor: remove console.log
  • Loading branch information
blacha authored Aug 18, 2022
1 parent e349f3e commit 3414d90
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/landing/src/url.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { GoogleTms, ImageFormat, TileMatrixSet } from '@basemaps/geo';
import { Config } from './config.js';
import { toQueryString } from '@basemaps/shared/build/url.js';

export interface LonLat {
lat: number;
Expand Down Expand Up @@ -70,8 +71,8 @@ export const WindowUrl = {
},

toBaseWmts(): string {
const api = Config.ApiKey == null || Config.ApiKey === '' ? '' : `?api=${Config.ApiKey}`;
return `${this.baseUrl()}/v1/tiles/aerial/WMTSCapabilities.xml${api}`;
const query = toQueryString({ api: Config.ApiKey, config: Config.map.config });
return `${this.baseUrl()}/v1/tiles/aerial/WMTSCapabilities.xml${query}`;
},

toImageryUrl(layerId: string, imageryType: string): string {
Expand Down

0 comments on commit 3414d90

Please sign in to comment.