diff --git a/webapp/graphql/PostQuery.js b/webapp/graphql/PostQuery.js index 83eec2a30..29b7a1f07 100644 --- a/webapp/graphql/PostQuery.js +++ b/webapp/graphql/PostQuery.js @@ -77,6 +77,10 @@ export const filterPosts = (i18n) => { eventEnd eventVenue eventLocationName + eventLocation { + lng + lat + } eventIsOnline ...post ...postCounts diff --git a/webapp/pages/map.vue b/webapp/pages/map.vue index 297b151f7..5bb800ba8 100644 --- a/webapp/pages/map.vue +++ b/webapp/pages/map.vue @@ -120,13 +120,17 @@ export default { id: 'marker-blue', name: 'mapbox-marker-icon-20px-blue.png', }, + { + id: 'marker-green', + name: 'mapbox-marker-icon-20px-green.png', + }, { id: 'marker-orange', name: 'mapbox-marker-icon-20px-orange.png', }, { - id: 'marker-green', - name: 'mapbox-marker-icon-20px-green.png', + id: 'marker-purple', + name: 'mapbox-marker-icon-20px-purple.png', }, ], isImagesLoaded: false, @@ -156,7 +160,8 @@ export default { this.markers.isImagesLoaded && this.currentUser && this.users && - this.groups + this.groups && + this.posts ) }, styles() { @@ -255,17 +260,27 @@ export default { // Copy coordinates array. const coordinates = e.features[0].geometry.coordinates.slice() - const markerTypeLabel = - e.features[0].properties.type === 'group' - ? this.$t('map.markerTypes.group') - : e.features[0].properties.type === 'user' - ? this.$t('map.markerTypes.user') - : this.$t('map.markerTypes.theUser') - const markerProfileLinkTitle = - (e.features[0].properties.type === 'group' ? '&' : '@') + e.features[0].properties.slug - const markerProfileLink = - (e.features[0].properties.type === 'group' ? '/group' : '/profile') + - `/${e.features[0].properties.id}/${e.features[0].properties.slug}` + const markerTypeLabel = this.$t(`map.markerTypes.${e.features[0].properties.type}`) + const markerProfile = { + theUser: { + linkTitle: '@' + e.features[0].properties.slug, + link: `/profile/${e.features[0].properties.id}/${e.features[0].properties.slug}`, + }, + user: { + linkTitle: '@' + e.features[0].properties.slug, + link: `/profile/${e.features[0].properties.id}/${e.features[0].properties.slug}`, + }, + group: { + linkTitle: '&' + e.features[0].properties.slug, + link: `/group/${e.features[0].properties.id}/${e.features[0].properties.slug}`, + }, + event: { + linkTitle: e.features[0].properties.slug, + link: `/post/${e.features[0].properties.id}/${e.features[0].properties.slug}`, + }, + } + const markerProfileLinkTitle = markerProfile[e.features[0].properties.type].linkTitle + const markerProfileLink = markerProfile[e.features[0].properties.type].link let description = `