Akryum/vue-googlemaps

Can't drag and drop map correctly, marker moves with drag direction

Radiergummi opened this issue · 3 comments

This issue occurs on the demo page as well (using Chrome/MacOS): If you try to scroll the map by using drag and drop, it only moves by a very small distance, then sticking until you drag and drop again. As this is a little hard to put into words, I've made a GIF:

feb -15-2018 13-05-01

In my own case, the marker seems to move with the map if I drag and drop:
feb -15-2018 13-07-24

maps.google.com works fine, as other embedded maps (without this Vue component) do.
Any idea what causes this and how to resolve it?

Okay, I feel a little stupid concerning the moving marker, obviously I was using the same coordinates object for the center prop and my marker position. Duh, rookie mistake.

Cannot get rid of the drag and drop problem, though...

Though I do not know how to fix it, it seems to be caused by binding an event handler to the update of the center property below.
https://github.com/Akryum/vue-googlemaps/blob/master/src/components/Map.vue#L131

Now whats the solution for dragging map cm by cm?