changes
# Conflicts: # src/components/LeafletTest.vue
This commit is contained in:
21
src/stores/leaflet.ts
Normal file
21
src/stores/leaflet.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { defineStore, acceptHMRUpdate } from 'pinia';
|
||||
|
||||
interface State {
|
||||
zoom: number
|
||||
center: [number, number]
|
||||
markerLatLng: [number, number]
|
||||
}
|
||||
|
||||
export const useLeafletStore = defineStore('leaflet', {
|
||||
state: (): State => {
|
||||
return {
|
||||
zoom: 10,
|
||||
center: [40.71278, -74.00594],
|
||||
markerLatLng: [40.71278, -74.00594],
|
||||
}
|
||||
},
|
||||
})
|
||||
|
||||
if (import.meta.hot) {
|
||||
import.meta.hot.accept(acceptHMRUpdate(useLeafletStore, import.meta.hot));
|
||||
}
|
||||
Reference in New Issue
Block a user