2018-06-27 14:59:45 +02:00
|
|
|
<template>
|
2018-07-05 22:40:24 +02:00
|
|
|
<v-lmarker :lat-lng="marker.latLng" :icon="icon" @click="onClick"></v-lmarker>
|
2018-06-27 14:59:45 +02:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { REPORT_TYPES } from '@/constants';
|
|
|
|
|
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
marker: Object,
|
|
|
|
},
|
2018-07-05 22:40:24 +02:00
|
|
|
computed: {
|
|
|
|
icon() {
|
|
|
|
if (this.$store.state.reportDetailsID === this.marker.id) {
|
|
|
|
return REPORT_TYPES[this.marker.type].markerLarge;
|
|
|
|
}
|
|
|
|
return REPORT_TYPES[this.marker.type].marker;
|
|
|
|
},
|
|
|
|
},
|
2018-06-27 14:59:45 +02:00
|
|
|
data() {
|
|
|
|
return {
|
2018-07-05 22:40:24 +02:00
|
|
|
showCard: false,
|
2018-06-27 14:59:45 +02:00
|
|
|
};
|
|
|
|
},
|
2018-07-05 22:40:24 +02:00
|
|
|
methods: {
|
|
|
|
onClick() {
|
|
|
|
this.$store.dispatch('showReportDetails', this.marker.id);
|
|
|
|
},
|
|
|
|
},
|
2018-06-27 14:59:45 +02:00
|
|
|
};
|
|
|
|
</script>
|