fix: location

This commit is contained in:
Shivam Mishra
2024-12-06 10:45:26 +05:30
parent 685cf56819
commit 9c6b78700c
2 changed files with 10 additions and 6 deletions
@@ -49,10 +49,9 @@ const mapUrl = computed(
() => `https://maps.google.com/?q=${lat.value},${long.value}`
);
const setupMap = async () => {
await nextTick();
const setupMap = () => {
const map = new maplibregl.Map({
style: 'https://tiles.openfreemap.org/styles/liberty',
style: 'https://tiles.openfreemap.org/styles/positron',
center: [long.value, lat.value],
zoom: 9.5,
container: 'map',
@@ -69,7 +68,10 @@ const setupMap = async () => {
return map;
};
onMounted(setupMap);
onMounted(async () => {
await nextTick();
setupMap();
});
</script>
<template>