refector code

This commit is contained in:
DESKTOP-1R2VSQH\Lenovo ThinkPad E490 2024-09-02 17:37:08 +07:00
parent 067ac5f173
commit 23d6801f80
9 changed files with 338 additions and 217 deletions

View file

@ -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<LocationObject>()
const poiPlaceName = ref<string>('')
const currentPosition = ref<LocationObject>() //
const poiPlaceName = ref<string>('') //
// Replace ArcGIS api key
const apiKey = ref<string>(
@ -123,7 +124,7 @@ async function initializeMap() {
}
onMounted(async () => {
initializeMap()
await initializeMap()
})
</script>