diff --git a/src/components/AscGISMap.vue b/src/components/AscGISMap.vue index 4678ab2..0433376 100644 --- a/src/components/AscGISMap.vue +++ b/src/components/AscGISMap.vue @@ -2,17 +2,18 @@ import { onMounted, ref } from 'vue' import { loadModules } from 'esri-loader' import axios from 'axios' + import type { LocationObject } from '@/interface/index/Main' const emit = defineEmits(['update:location']) -function updateLocation(latitude: any, longitude: any, namePOI: string) { +function updateLocation(latitude: number, longitude: number, namePOI: string) { // ส่ง event ไปยัง parent component เพื่ออัพเดทค่า props emit('update:location', latitude, longitude, namePOI) } -const currentPosition = ref() -const poiPlaceName = ref('') +const currentPosition = ref() //ตำแหน่งปัจจุบัน +const poiPlaceName = ref('') // ชื่อพื้นที่ใกล้เคียง // Replace ArcGIS api key const apiKey = ref( @@ -123,7 +124,7 @@ async function initializeMap() { } onMounted(async () => { - initializeMap() + await initializeMap() }) diff --git a/src/components/FormTime.vue b/src/components/FormTime.vue index 4c10ec1..e433642 100644 --- a/src/components/FormTime.vue +++ b/src/components/FormTime.vue @@ -1,24 +1,32 @@