From 2441b7bb57b6288dc9c37337a30c1b05a47ab6f7 Mon Sep 17 00:00:00 2001 From: Pascal Barth Date: Wed, 12 Jul 2023 09:38:09 +0200 Subject: [PATCH] BGDIINF_SB-2949: adding 3D bucket base URL for each staging --- .env.development | 1 + .env.integration | 1 + .env.production | 1 + src/config.js | 7 +++++++ src/modules/map/components/cesium/constants.js | 4 +++- 5 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.env.development b/.env.development index c8c8de089..49eab7e0f 100644 --- a/.env.development +++ b/.env.development @@ -9,3 +9,4 @@ VITE_API_SERVICES_BASE_URL=https://sys-map.dev.bgdi.ch/api/ VITE_API_SERVICE_KML_BASE_URL=https://sys-public.dev.bgdi.ch/ VITE_API_SERVICE_KML_STORAGE_BASE_URL=https://sys-public.dev.bgdi.ch/ VITE_APP_API_SERVICE_SHORTLINK_BASE_URL=https://sys-s.dev.bgdi.ch/ +VITE_APP_3D_TILES_BASE_URL=https://sys-3d.dev.bgdi.ch/ diff --git a/.env.integration b/.env.integration index 2ae17afd0..bc912cf4c 100644 --- a/.env.integration +++ b/.env.integration @@ -8,3 +8,4 @@ VITE_API_SERVICES_BASE_URL=https://sys-map.int.bgdi.ch/api/ VITE_API_SERVICE_KML_BASE_URL=https://sys-public.int.bgdi.ch/ VITE_API_SERVICE_KML_STORAGE_BASE_URL=https://sys-public.int.bgdi.ch/ VITE_APP_API_SERVICE_SHORTLINK_BASE_URL=https://sys-s.int.bgdi.ch/ +VITE_APP_3D_TILES_BASE_URL=https://sys-3d.int.bgdi.ch/ diff --git a/.env.production b/.env.production index af9fb5e34..d15acf6db 100644 --- a/.env.production +++ b/.env.production @@ -8,3 +8,4 @@ VITE_API_SERVICES_BASE_URL=https://map.geo.admin.ch/api/ VITE_API_SERVICE_KML_BASE_URL=https://public.geo.admin.ch/ VITE_API_SERVICE_KML_STORAGE_BASE_URL=https://public.geo.admin.ch/ VITE_APP_API_SERVICE_SHORTLINK_BASE_URL=https://s.geo.admin.ch/ +VITE_APP_3D_TILES_BASE_URL=https://3d.geo.admin.ch/ diff --git a/src/config.js b/src/config.js index 08bd9c18b..864c24341 100644 --- a/src/config.js +++ b/src/config.js @@ -153,6 +153,13 @@ export const WMTS_BASE_URL = enforceEndingSlashInUrl(import.meta.env.VITE_WMTS_B */ export const WMS_BASE_URL = enforceEndingSlashInUrl(import.meta.env.VITE_WMS_BASE_URL) +/** + * Root of the buckets serving 3D tiles + * + * @type {String} + */ +export const BASE_URL_3D_TILES = enforceEndingSlashInUrl(import.meta.env.VITE_APP_3D_TILES_BASE_URL) + /** * Default tile size to use when requesting WMS tiles with our internal WMSs (512px) * diff --git a/src/modules/map/components/cesium/constants.js b/src/modules/map/components/cesium/constants.js index eec830133..9328bdbf1 100644 --- a/src/modules/map/components/cesium/constants.js +++ b/src/modules/map/components/cesium/constants.js @@ -1,6 +1,8 @@ +import { BASE_URL_3D_TILES } from '@/config' + /** * 3D terrain URL * * @type {string} */ -export const TERRAIN_URL = 'https://sys-3d.dev.bgdi.ch/ch.swisstopo.terrain.3d/v1/' +export const TERRAIN_URL = `${BASE_URL_3D_TILES}/ch.swisstopo.terrain.3d/v1/`