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,22 +1,18 @@
<script lang="ts">
import mapboxgl from 'mapbox-gl';
import Data from '$lib/components/Data.svelte';
import Map from '$lib/components/Map.svelte';
import Menu from '$lib/components/Menu.svelte';
import Toolbar from '$lib/components/Toolbar.svelte';
import LayerControl from '$lib/components/layer-control/LayerControl.svelte';
let map: mapboxgl.Map | null = null;
</script>
<div class="flex flex-col w-screen h-screen">
<div class="grow relative">
<Menu />
<Toolbar />
<Map class="h-full" bind:map />
<LayerControl {map} />
<Data {map} />
<Map class="h-full" />
<LayerControl />
<Data />
</div>
<div class="h-12">Test</div>
</div>