use store to access map object

This commit is contained in:
vcoppe
2024-04-17 11:44:37 +02:00
parent bd2d3eed66
commit ab0b425243
7 changed files with 48 additions and 55 deletions

View File

@@ -1,11 +1,7 @@
<script lang="ts">
import mapboxgl from 'mapbox-gl';
import GPX from './GPX.svelte';
import { GPXFile, parseGPX } from 'gpx';
export let map: mapboxgl.Map | null;
let files: GPXFile[] = [
parseGPX(`<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -271,5 +267,5 @@
</script>
{#each files as file}
<GPX {map} {file} />
<GPX {file} />
{/each}