From 3b631019faf22696ebeee5800b7d30206928172e Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Wed, 14 Aug 2024 17:53:27 +0200 Subject: [PATCH 1/3] migrated from attaching geojsons to adding a `MapServerHandler` to the map --- webclient/app/components/IndoorMap.vue | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/webclient/app/components/IndoorMap.vue b/webclient/app/components/IndoorMap.vue index 01763ecdd..620b8247e 100644 --- a/webclient/app/components/IndoorMap.vue +++ b/webclient/app/components/IndoorMap.vue @@ -173,13 +173,8 @@ async function initMap(containerId: string): Promise { addIndoorTo(map); - // Retrieve the geojson from the path and add the map - const geojson: FeatureCollection = await (await fetch("/gare-de-l-est.geojson")).json(); - const indoorOptions = { - showFeaturesWithEmptyLevel: false, - } as IndoorMapOptions; - const indoorMap = IndoorMap.fromGeojson(geojson, indoorOptions); - await map.indoor.addMap(indoorMap); + const indoorOptions = { showFeaturesWithEmptyLevel: false } as IndoorMapOptions; + MapServerHandler.manage(`${runtimeConfig.public.apiURL}/api/maps/indoor`, map, indoorOptions); // Add the specific control map.addControl(new IndoorControl(), "bottom-left"); From db3c402d43560547468b06bc255ba405b9b7164b Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Wed, 14 Aug 2024 17:57:56 +0200 Subject: [PATCH 2/3] fixed linting errors --- webclient/app/components/IndoorMap.vue | 5 +---- webclient/package.json | 1 - webclient/pnpm-lock.yaml | 9 --------- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/webclient/app/components/IndoorMap.vue b/webclient/app/components/IndoorMap.vue index 620b8247e..ba5ed626c 100644 --- a/webclient/app/components/IndoorMap.vue +++ b/webclient/app/components/IndoorMap.vue @@ -1,10 +1,9 @@