dynamically import the maptiler api key
This commit is contained in:
@@ -55,9 +55,9 @@
|
||||
|
||||
onMount(async () => {
|
||||
const { Map, Marker, config } = await import('@maptiler/sdk');
|
||||
const { PUBLIC_MAPTILER_API_KEY } = await import('$env/static/public');
|
||||
const { env } = await import('$env/dynamic/public');
|
||||
|
||||
config.apiKey = PUBLIC_MAPTILER_API_KEY;
|
||||
config.apiKey = env.PUBLIC_MAPTILER_API_KEY;
|
||||
MapMarker = Marker;
|
||||
|
||||
const initMap = (center: [number, number], zoom: number) => {
|
||||
|
||||
Reference in New Issue
Block a user