Skip to content

Commit ac29e10

Browse files
committed
Add Changelog entry, remove unneeded code
1 parent 58f1aff commit ac29e10

File tree

4 files changed

+15
-16
lines changed

4 files changed

+15
-16
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66

77
### Changed
88

9+
- Config is loaded from the frontend at runtime now.
10+
911
### Fixed

ui/src/api/client-config.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
export interface ClientConfig {
2-
'env': 'dev' | 'int' | 'prod',
3-
'ion_default_access_token': string,
4-
'auth': {
5-
'cognito_client_id': string,
6-
'cognito_pool_id': string,
7-
'cognito_identity_pool_id': string,
8-
'cognito_aws_region': string,
2+
env: 'dev' | 'int' | 'prod',
3+
ion_default_access_token: string,
4+
auth: {
5+
cognito_client_id: string,
6+
cognito_pool_id: string,
7+
cognito_identity_pool_id: string,
8+
cognito_aws_region: string,
99
}
1010
}

ui/src/api/config.service.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,9 @@ export class ConfigService {
99
}
1010

1111
async getConfig(): Promise<ClientConfig | null> {
12-
const headers = {};
1312
try {
1413
const response = await fetch(`${this.apiUrl}/client-config`, {
1514
method: 'GET',
16-
headers: headers,
1715
});
1816
return await response.json() as ClientConfig;
1917
} catch (e) {

ui/src/layers/helpers.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import {
1818
import {getSwisstopoImagery} from '../swisstopoImagery';
1919
import {LayerType} from '../constants';
2020
import {isLabelOutlineEnabled} from '../permalink';
21-
// import AmazonS3Resource from '../AmazonS3Resource.js';
21+
import AmazonS3Resource from '../AmazonS3Resource.js';
2222
import {getVoxelShader} from './voxels-helper';
2323
import MainStore from '../store/main';
2424
import {LayerConfig} from '../layertree';
@@ -89,13 +89,12 @@ export async function create3DVoxelsTilesetFromConfig(viewer: Viewer, config: La
8989
return primitive;
9090
}
9191
export async function create3DTilesetFromConfig(viewer: Viewer, config: LayerConfig, tileLoadCallback) {
92-
let resource: string | IonResource; // | AmazonS3Resource
92+
let resource: string | IonResource | AmazonS3Resource;
9393
if (config.aws_s3_bucket && config.aws_s3_key) {
94-
throw new Error('Amazon S3 resources is not implemented');
95-
// resource = new AmazonS3Resource({
96-
// bucket: config.aws_s3_bucket,
97-
// url: config.aws_s3_key,
98-
// });
94+
resource = new AmazonS3Resource({
95+
bucket: config.aws_s3_bucket,
96+
url: config.aws_s3_key,
97+
});
9998
} else if (config.url) {
10099
resource = config.url;
101100
} else {

0 commit comments

Comments
 (0)