We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0bfaea6 commit 49f6eb3Copy full SHA for 49f6eb3
packages/demo/pages/issue-249.vue
@@ -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