xkjyeah / vue-google-maps

Google maps component for vue with 2-way data binding
https://xkjyeah.github.io/vue-google-maps/
1.88k stars 475 forks source link

@dragend callback returns undefined on gmap-map component #650

Closed onurgultekin closed 5 years ago

onurgultekin commented 5 years ago

I want to use dragend event on component like below in my Nuxt powered project:

<gmap-map
          :center="center"
          :map-type-id="mapTypeId"
          :zoom="17"
          :options="{disableDefaultUI : true}"
          @dragend="dragEnd"
        />
methods: {
dragEnd(event) {
      console.log(event)
    }
}

console.log gives me undefined. I tried to use it like

@dragend="dragEnd($event)"

but result is undefined again.

JGRusty404 commented 5 years ago

Also getting the same issue in a standard Vue template

xkjyeah commented 5 years ago

The JS API does not pass any arguments to the dragend event handler: https://developers.google.com/maps/documentation/javascript/reference/map#Map.dragend

Therefore this library does not pass any arguments to the event handler either