Initial minimap concept added to the dataset-detail

This commit is contained in:
Porras-Bernardez 2024-05-23 16:59:17 +02:00
parent 2d38b690fa
commit ccf4e238f3
6 changed files with 52 additions and 2 deletions

View file

@ -0,0 +1,40 @@
<template>
<div id="map" style="height: 300px;"></div>
</template>
<script lang="ts">
import { defineComponent, onMounted } from 'vue';
import * as L from 'leaflet';
import 'leaflet/dist/leaflet.css';
export default defineComponent({
name: 'MapComponent',
setup() {
onMounted(() => {
const map = L.map('map').setView([47.71, 13.55], 6);
// // Create the map
// this.map = L.map('map', {
// center: [47.71, 13.55],
// zoom: 7,
// minZoom: 6,
// editable: true // For the "Leaflet.Editable" library
// });
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
});
return {};
}
});
</script>
<style scoped>
#map {
height: 100%;
width: 100%;
}
</style>