add leaflet and component

This commit is contained in:
dskvr
2022-11-28 22:57:52 +01:00
parent 8287ad6c52
commit 20e31671d1
2 changed files with 40 additions and 0 deletions

View File

@@ -15,6 +15,7 @@
},
"dependencies": {
"@2alheure/vue-safe-mail": "1.0.3",
"@vue-leaflet/vue-leaflet": "0.6.1",
"core-js": "^3.8.3",
"country-code-emoji": "2.3.0",
"cross-fetch": "3.1.5",

View File

@@ -0,0 +1,39 @@
<template>
<l-map ref="map" v-model:zoom="zoom" :center="[47.41322, -1.219482]">
<l-tile-layer
url="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"
layer-type="base"
name="OpenStreetMap"
></l-tile-layer>
<l-marker v-for="([relay, result]) in Object.entries(results)" :lat-lng="result.geo.latlng" draggable>
<l-popup>
{{ result.uri }}
</l-popup>
</l-marker>
</l-map>
</template>
<script>
import "leaflet/dist/leaflet.css"
import { LMap, LTileLayer, LMarker } from "@vue-leaflet/vue-leaflet";
export default {
components: {
LMap,
LTileLayer,
LMarker,
LPopup,
},
data() {
return {
markers: {
type: Object,
default(){
return {}
}
}
};
},
};
</script>
<style></style>