新增点击地点标点,弹窗地点信息弹窗功能

This commit is contained in:
2024-03-05 17:58:42 +08:00
parent 5820c08ed4
commit 295cfad7ed
9 changed files with 67 additions and 29 deletions

24
src/stores/flyto.js Normal file
View File

@@ -0,0 +1,24 @@
import { defineStore } from 'pinia'
import { isLnglat } from '/@/api/util'
export const useFlytoStore = defineStore({
id: 'flyto',
state: () => ({
lng: NaN,
lat: NaN,
}),
getters: {
value: (state) => { state.lng, state.lat }
},
actions: {
set(flyto) {
if ( !isLnglat(flyto) ) return false
this.lng = flyto.lng
this.lat = flyto.lat
return true
},
},
})