Hi, First Run npm install vue2-leaflet leaflet --save
and as example: this is my code for a vue page:
<template>
<q-page padding class="flex">
<q-card style="flex:1">
<l-map :zoom="zoom" :center="center">
<l-tile-layer :url="url" :attribution="attribution"></l-tile-layer>
</l-map>
</q-card>
</q-page>
</template>
<script>
import { LMap, LTileLayer } from 'vue2-leaflet'
import L from 'leaflet'
import 'leaflet/dist/leaflet.css'
export default {
name: 'Map',
components: {
LMap,
LTileLayer
},
data () {
return {
zoom: 13,
center: L.latLng(47.413220, -1.219482),
url: 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}
}
}
</script>
<style>
</style>