forked from zhouruizhe/gmTouringMiniApp
Add check-in feature and update travel planner UI
This commit is contained in:
@@ -11,6 +11,7 @@ interface MapSessionState {
|
||||
categoryCode: string | null
|
||||
selectedPoiId: string | null
|
||||
viewport: MapViewport
|
||||
plannedRouteVisible: boolean
|
||||
}
|
||||
|
||||
function isFinitePoint(point: GeoPoint): boolean {
|
||||
@@ -22,6 +23,7 @@ export const useMapStore = defineStore('map-session', {
|
||||
categoryCode: null,
|
||||
selectedPoiId: null,
|
||||
viewport: { ...DEFAULT_GUANGMING_VIEWPORT },
|
||||
plannedRouteVisible: false,
|
||||
}),
|
||||
actions: {
|
||||
setCategory(categoryCode: string | null) {
|
||||
@@ -39,10 +41,17 @@ export const useMapStore = defineStore('map-session', {
|
||||
resetViewport(viewport: MapViewport = DEFAULT_GUANGMING_VIEWPORT) {
|
||||
this.viewport = { ...viewport }
|
||||
},
|
||||
showPlannedRoute() {
|
||||
this.plannedRouteVisible = true
|
||||
},
|
||||
hidePlannedRoute() {
|
||||
this.plannedRouteVisible = false
|
||||
},
|
||||
resetSession(viewport: MapViewport = DEFAULT_GUANGMING_VIEWPORT) {
|
||||
this.categoryCode = null
|
||||
this.selectedPoiId = null
|
||||
this.viewport = { ...viewport }
|
||||
this.plannedRouteVisible = false
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user