diff --git a/summer2024-frontend/src/stores/posts.js b/summer2024-frontend/src/stores/posts.js index 3e28e74..ce9fb55 100644 --- a/summer2024-frontend/src/stores/posts.js +++ b/summer2024-frontend/src/stores/posts.js @@ -4,6 +4,7 @@ import { formatRelative } from 'date-fns' import { fr } from 'date-fns/locale' import { marked } from 'marked' import { API_BASE_URL } from '@/config.js' +import { fromLonLat } from 'ol/proj.js' export const usePostsStore = defineStore('posts', () => { const postsApiPath = API_BASE_URL + '/posts' @@ -21,6 +22,7 @@ export const usePostsStore = defineStore('posts', () => { const postDate = new Date(post.date) post.formatedDate = formatRelative(postDate, new Date(), { locale: fr }) post.formatedDescription = marked.parse(post.description) + post.projectedCoordinates = fromLonLat([post.location.lon, post.location.lat]); } return posts.value diff --git a/summer2024-frontend/src/views/MapView.vue b/summer2024-frontend/src/views/MapView.vue index 6eb1fd8..42478b8 100644 --- a/summer2024-frontend/src/views/MapView.vue +++ b/summer2024-frontend/src/views/MapView.vue @@ -1,13 +1,20 @@