diff --git a/src/components/map/PoiMarker.vue b/src/components/map/PoiMarker.vue index c85e90d4d..9a71c2417 100644 --- a/src/components/map/PoiMarker.vue +++ b/src/components/map/PoiMarker.vue @@ -163,8 +163,21 @@ export default { this.map.removeLayer(this.marker); } }, - methods: { - - } + methods: { + onAddFavorite() { + this.$emit('add-favorite', { + latLng: { lat: this.poi.lat, lng: this.poi.lon }, + name: this.header, + formattedAddress: formatAddress(this.poi.address), + address: this.poi.address, + }) + if (this.map) this.map.closePopup() + }, + onAddContact() { + this.$emit('place-contact', { + latLng: { lat: this.poi.lat, lng: this.poi.lon }, + }) + }, + } } \ No newline at end of file diff --git a/src/views/App.vue b/src/views/App.vue index 09450b67e..0582df7a7 100644 --- a/src/views/App.vue +++ b/src/views/App.vue @@ -1686,7 +1686,7 @@ export default { || obj.address.road || obj.address.city_district : null - this.addFavorite(obj.latLng, name, null, obj.formattedAddress || null) + this.addFavorite(obj.latLng, name, null, obj.formattedAddress || null, null, true, true) }, onAddFavoriteToMap(f) { this.chooseMyMap((map) => {