forked from geolba/tethys.frontend
Initial minimap concept added to the dataset-detail
This commit is contained in:
parent
2d38b690fa
commit
ccf4e238f3
6 changed files with 52 additions and 2 deletions
40
src/components/MapComponent.vue
Normal file
40
src/components/MapComponent.vue
Normal 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: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
});
|
||||
|
||||
return {};
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#map {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
</style>
|
||||
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue