-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.vue
38 lines (34 loc) · 754 Bytes
/
App.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
<template>
<div id="app">
<div id="map" style="height: 500px;"></div>
</div>
</template>
<script>
import L from 'leaflet';
export default {
name: 'App',
mounted() {
this.initMap();
},
methods: {
initMap() {
const map = L.map('map').setView([51.505, -0.09], 13);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© OpenStreetMap contributors'
}).addTo(map);
}
}
}
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
/* Ensure you import Leaflet CSS */
@import "~leaflet/dist/leaflet.css";
</style>