frontend/src/views/Home.vue

41 lines
806 B
Vue
Raw Normal View History

2023-07-15 15:03:08 +07:00
<template>
2023-07-15 17:55:52 +07:00
<!-- TO DO need someone to make map fuctional properly -->
<!--don't know why height auto didn't work so i write 1117px for temporary -->
2023-07-15 17:52:21 +07:00
<ol-map
:loadTilesWhileAnimating="true"
:loadTilesWhileInteracting="true"
style=
"
height: 100%;
width: 100%;
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
"
2023-07-15 17:52:21 +07:00
>
<ol-view
ref="view"
:center="center"
:rotation="rotation"
:zoom="zoom"
:projection="projection"
/>
<ol-tile-layer>
<ol-source-osm />
</ol-tile-layer>
</ol-map>
2023-07-15 15:03:08 +07:00
</template>
2023-07-15 17:52:21 +07:00
2023-07-15 15:03:08 +07:00
<script setup>
2023-07-15 17:52:21 +07:00
import { ref } from "vue";
const center = ref([100.538611, 13.764722]);
2023-07-15 17:52:21 +07:00
const projection = ref("EPSG:4326");
const zoom = ref(19);
2023-07-15 17:52:21 +07:00
const rotation = ref(0);
2023-07-15 15:03:08 +07:00
</script>