Skip to content

Commit

Permalink
Add issue #249 to the demo
Browse files Browse the repository at this point in the history
  • Loading branch information
titouanmathis committed Feb 12, 2025
1 parent 0bfaea6 commit 49f6eb3
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions packages/demo/pages/issue-249.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<script setup>
import { ref } from 'vue';
import { MapboxMap, MapboxGeocoder } from '@studiometa/vue-mapbox-gl';
import 'mapbox-gl/dist/mapbox-gl.css';
import '@mapbox/mapbox-gl-geocoder/lib/mapbox-gl-geocoder.css';
const config = useRuntimeConfig();
const showMap = ref(true);
</script>

<template>
<div>
<label>
<input v-model="showMap" type="checkbox" />
toggle map
</label>
<MapboxMap
v-if="showMap"
style="height: 60vh"
:access-token="config.public.accessToken"
map-style="mapbox://styles/mapbox/streets-v11">
<MapboxGeocoder />
</MapboxMap>
</div>
</template>

0 comments on commit 49f6eb3

Please sign in to comment.