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
264 stars 51 forks source link

Accessing customMarker from CustomMarker Component is undefined #130

Closed manuelarling closed 1 year ago

manuelarling commented 1 year ago

Im trying to get the customMarker (google.maps.CustomMarker) Object from the CustomMarker component via ref:

<CustomMarker ref="marker" :options="marker.options"> ... </CustomMarker>

but when im trying this:

`const marker = ref()

const customMarker = marker.value.customMarker`

customMarker ist undefined, but the ref is fine.

It is also working with the normal Marker Component.

HusamElbashir commented 1 year ago

Can you please provide a minimal reproduction? You can use https://vite.new/vue

manuelarling commented 1 year ago

Sorry for the late answer. Here is a simple example: https://stackblitz.com/edit/vitejs-vite-elvdes?file=src%2FApp.vue You can see in the console, that the markerRef has a marker property but the customMarker ref has a undefined customMarker property.

manuelarling commented 1 year ago

Accidentally closed even though the issue still persists. I apologize.