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");