From 048d864f5fef7d9a15c5fc99ab1bcc76f36c09b4 Mon Sep 17 00:00:00 2001 From: kai Date: Wed, 1 May 2024 15:26:23 +0800 Subject: [PATCH] Fix frontend --- frontend/maplibre-geocoder/src/main.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/maplibre-geocoder/src/main.js b/frontend/maplibre-geocoder/src/main.js index d3a105c..84de8e7 100644 --- a/frontend/maplibre-geocoder/src/main.js +++ b/frontend/maplibre-geocoder/src/main.js @@ -11,6 +11,7 @@ import { GeocodingServices } from './modules/utils'; // https://www.stefanjudis.com/snippets/how-to-import-json-files-in-es-modules-node-js/ import mplStyle from './assets/mpl-style.json' assert { type: 'json' }; +const { BASE_URL } = import.meta.env; // const geocodingProvider = 'japan-gsi'; const geocodingProvider = 'nominatim'; const markerLngLat = [139.76712479635535, 35.68123617258725]; @@ -28,7 +29,7 @@ const map = new maplibregl.Map({ const marker = new maplibregl.Marker().setLngLat(markerLngLat).addTo(map) marker.getElement().addEventListener('click', () => { - window.open('/test1.txt') + window.open(`${BASE_URL}test1.txt`) });