I would like to track the coordinates of the center of my map. So far I have used this:
// On Drag End google.maps.event.addListener(map, 'dragend', function() { $('.map_center_coords .latitude').html( map.getCenter().lat() ); $('.map_center_coords .longitude').html( map.getCenter().lng() ); });
which works by getting coordinates at the end of a drag event.
The problem is that now I am using map.panTo to move to a specific location.
Is there an event basically "whenever the center has *finished* moving in any way" ?
As geocodezip mentioned, I forgot about the center_changed event. But this event is continuously fired when the card is dragged / tinted.
Ideally, I'm looking for an event that fires only once, after any drag / pan.
source share