inocan-group / vue3-google-map

A set of composable components for easy use of Google Maps in your Vue 3 projects.
https://vue3-google-map.com
MIT License
283 stars 57 forks source link

Example of Marker Click events #5

Closed jasonandress closed 3 years ago

jasonandress commented 3 years ago

I need to know what marker was clicked. I've setup a click event on each marker, and it fires the code. Now I need to know what marker was clicked.

<Marker :options="markerOptions1" @click="markerClicked"/>

const markerClicked = (event: google.maps.MouseEvent) => {
  console.log(event);
};

event is always undefined.

HusamElbashir commented 3 years ago

Thanks for bringing that up. We need to expose the underlying event.

jasonandress commented 3 years ago

Thanks for confirming. Do you have plans to do that soon? Thanks

HusamElbashir commented 3 years ago

Thanks for confirming. Do you have plans to do that soon? Thanks

This landed in v0.4.0.