forked from jperelli/vue2-leaflet-googlemutant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.vue
40 lines (37 loc) · 853 Bytes
/
example.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<template>
<v-map :zoom=10 :center="initialLocation">
<v-tilelayer-googlemutant :apikey="apikey" :options="options"></v-tilelayer-googlemutant>
</v-map>
</template>
<script>
import { latLng } from 'leaflet'
import { LMap, LTileLayer } from 'vue3-leaflet'
import Vue3LeafletGoogleMutant from './Vue3LeafletGoogleMutant'
export default {
components: {
'v-map': LMap,
'v-tilelayer': LTileLayer,
'v-tilelayer-googlemutant': Vue3LeafletGoogleMutant
},
methods: {
},
data () {
let options = {
type: 'roadmap'
}
let apikey = 'YOUR_API_KEY'
return {
apikey,
options,
initialLocation: latLng(-34.9205, -57.953646)
}
}
}
</script>
<style>
@import "~leaflet/dist/leaflet.css";
html, body {
height: 100%;
margin: 0;
}
</style>