Skip to content

Commit 49f6eb3

Browse files
committed
Add issue #249 to the demo
1 parent 0bfaea6 commit 49f6eb3

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

packages/demo/pages/issue-249.vue

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<script setup>
2+
import { ref } from 'vue';
3+
import { MapboxMap, MapboxGeocoder } from '@studiometa/vue-mapbox-gl';
4+
import 'mapbox-gl/dist/mapbox-gl.css';
5+
import '@mapbox/mapbox-gl-geocoder/lib/mapbox-gl-geocoder.css';
6+
7+
const config = useRuntimeConfig();
8+
const showMap = ref(true);
9+
</script>
10+
11+
<template>
12+
<div>
13+
<label>
14+
<input v-model="showMap" type="checkbox" />
15+
toggle map
16+
</label>
17+
<MapboxMap
18+
v-if="showMap"
19+
style="height: 60vh"
20+
:access-token="config.public.accessToken"
21+
map-style="mapbox://styles/mapbox/streets-v11">
22+
<MapboxGeocoder />
23+
</MapboxMap>
24+
</div>
25+
</template>

0 commit comments

Comments
 (0)