feat: plan trip
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type {
|
||||
Feature,
|
||||
FeatureCollection,
|
||||
LineString,
|
||||
MultiLineString,
|
||||
Point,
|
||||
} from "geojson";
|
||||
@@ -12,12 +13,17 @@ export const useMresoStore = defineStore("mresoStore", {
|
||||
clusters: {} as FeatureCollection<Point>,
|
||||
stops: {} as FeatureCollection<Point>,
|
||||
selectedRouteIds: [] as string[],
|
||||
selectedTrips: [] as Feature<LineString>[],
|
||||
}),
|
||||
actions: {
|
||||
async fetchData(options: { signal?: AbortSignal } = {}) {
|
||||
[this.routes, this.lines, this.clusters, this.stops] = await Promise.all([
|
||||
$fetch<Route[]>("/routes.json", options),
|
||||
$fetch<FeatureCollection<MultiLineString>>("/lines.json", options),
|
||||
// $fetch<FeatureCollection<MultiLineString>>(
|
||||
// "/trajets presque clean.geojson",
|
||||
// options,
|
||||
// ),
|
||||
$fetch<FeatureCollection<Point>>("/clusters.json", options),
|
||||
$fetch<FeatureCollection<Point>>("/stops.json", options),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user