customIcon

This commit is contained in:
2026-04-01 15:47:38 -04:00
parent e63a8a6329
commit a6264fad67
4 changed files with 89 additions and 29 deletions

View File

@@ -18,6 +18,14 @@ interface routeSegments {
toCoordinates: LatLng | null | undefined;
}
interface routeDirections {
waypoint: number;
text: string;
distance: number;
time: number;
coordinates: LatLng | null | undefined;
}
interface RouteSet {
start: [number, number] | [null, null] | [undefined, undefined] | null | undefined;
@@ -37,6 +45,7 @@ interface State {
};
routesSet: RoutesSet[] | null;
routeSegments?: routeSegments[] | null;
routeDirections?: routeDirections[] | null;
}
export const useLeafletStore = defineStore('leaflet', {
@@ -46,16 +55,15 @@ export const useLeafletStore = defineStore('leaflet', {
center: [favorites.home.coords.lat, favorites.home.coords.lng],
markerLatLng: null,
qLocDrawer: false,
routeSet:
{
start: { lat: null, lng: null },
end: { lat: null, lng: null},
wayPoints: null,
},
routeSet: {
start: { lat: null, lng: null },
end: { lat: null, lng: null },
wayPoints: null,
},
routesSet: null,
routeSegments: null,
}
routeDirections: null,
};
},
actions: {
setCenter(lat: number, lng: number) {
@@ -69,7 +77,10 @@ export const useLeafletStore = defineStore('leaflet', {
},
toggleQLocDrawer() {
this.qLocDrawer = !this.qLocDrawer
}
},
setRouteDirs(data: routeDirections[]) {
this.routeDirections = data;
},
}
})