@@ -45,13 +80,14 @@ const popupOffset = [0, iconSize.value[0] * -0.66]
-
-
-
-
+
+
+
+
@@ -70,9 +106,8 @@ const popupOffset = [0, iconSize.value[0] * -0.66]
}
&.highlight {
- color: var(--color-background);
- border: 2px solid var(--color-muted-foreground);
- background-color: var(--color-foreground);
+ color: var(--color-amber-400);
+ border: 2px solid color-mix(in srgb, var(--color-amber-400) 50%, var(--color-background));
}
}
diff --git a/src/components/Map.vue b/src/components/Map.vue
deleted file mode 100644
index 3a50671..0000000
--- a/src/components/Map.vue
+++ /dev/null
@@ -1,92 +0,0 @@
-
-
-
-
-
- Carte interactive des parkings vélo de Rennes Métropole
-
-
-
-
- Loading...
- Error: {{ state.error.message }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/src/components/filters/ParkingSpaceRange.vue b/src/components/filters/ParkingSpaceRange.vue
new file mode 100644
index 0000000..f4b01cb
--- /dev/null
+++ b/src/components/filters/ParkingSpaceRange.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+ Places
+ totales
+
+ {{ localRange[0] }} – {{ localRange[1] }}+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/forms/Checkbox.vue b/src/components/forms/Checkbox.vue
new file mode 100644
index 0000000..54daa5e
--- /dev/null
+++ b/src/components/forms/Checkbox.vue
@@ -0,0 +1,29 @@
+
+
+
+
+
diff --git a/src/pages/Home.vue b/src/pages/Home.vue
index a1a5109..5f13c15 100644
--- a/src/pages/Home.vue
+++ b/src/pages/Home.vue
@@ -1,5 +1,5 @@
@@ -10,6 +10,6 @@ import Map from '@/components/Map.vue';
-
+
diff --git a/src/stores/map.ts b/src/stores/map.ts
index a246b64..c3c14a7 100644
--- a/src/stores/map.ts
+++ b/src/stores/map.ts
@@ -2,14 +2,48 @@ import type { PointTuple } from 'leaflet'
import { defineStore } from 'pinia'
import { ref } from 'vue'
+export const SPOTS_MIN = 1
+export const SPOTS_MAX = 99
+
export const useMap = defineStore('map', () => {
const zoom = ref(10)
- const minZoom = 6
+ const minZoom = 8
const center = ref
([48.11180645878813, -1.6637869497745246])
+ const topLeftCorner: PointTuple = [48.88261491330733, -3.437430524894775]
+ const bottomRightCorner: PointTuple = [47.31027605502938, 0.6437600778583776]
+ const maxBounds: PointTuple[] = [topLeftCorner, bottomRightCorner]
+ const maxBoundsViscosity = 0.9
+
+ const extraOptions: Record = {
+ zoomControl: false,
+ }
+
+ const maxClusterRadius = 28
+ const disableClusteringAtZoom = 17
+
+ const filterUncovered = ref(true)
+ const filterCovered = ref(true)
+ const filterKorrigo = ref(true)
+
+ const filterCargoOnly = ref(false)
+ const filterStdOnly = ref(false)
+
+ const spotsRange = ref<[number, number]>([SPOTS_MIN, SPOTS_MAX])
return {
zoom,
minZoom,
center,
+ maxBounds,
+ maxBoundsViscosity,
+ maxClusterRadius,
+ disableClusteringAtZoom,
+ extraOptions,
+ filterUncovered,
+ filterCovered,
+ filterKorrigo,
+ filterCargoOnly,
+ filterStdOnly,
+ spotsRange,
}
})
diff --git a/src/utils/const.ts b/src/utils/const.ts
index b2c8b8e..70dcd30 100644
--- a/src/utils/const.ts
+++ b/src/utils/const.ts
@@ -1,3 +1,21 @@
+export const MAP_TILELAYER_URL =
+ 'https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png'
+
export const API_BASE_URL =
'https://data.rennesmetropole.fr/api/explore/v2.1/catalog/datasets/parkings_velos_sur_rennes_metropole/records'
export const API_LIMIT = 100
+
+export const UNCOVERED_KEY = 'Non abrité'
+export const COVERED_KEY = 'Abrité'
+export const BOXED_KEY = 'Box individuel'
+export const KORRIGO_KEY = 'Abonnement Korrigo'
+
+export enum SpotType {
+ Uncovered = UNCOVERED_KEY,
+ Covered = COVERED_KEY,
+ Boxed = BOXED_KEY,
+}
+
+export enum SpotAccess {
+ Korrigo = KORRIGO_KEY,
+}