I'm using Angular Google Maps to include a map in my web app. I am listening to the drag
event which fires successfully but the center
property of the map doesn't update until the dragging stops. Is this the expected behavior? I couldn't find any docs to confirm.
$scope.map = {
center: $scope.currentCoords,
control: {},
zoom: 15,
events: {drag: function(m, e, args){mapDragged(m, e, args)}}
};
var mapDragged = function(map, eventName, args){
console.log($scope.map.center); // this value only changes when dragging stops and restarts
}
UPDATE
I tried to use the native google maps events in this example that seem to capture the change in the center of the map but this still doesn't work. The 'center_changed'
event only fires after the drag stops and not like in the example
google.maps.event.addListener($scope.map.control.getGMap(), 'center_changed',function() {
console.log($scope.map.control.getGMap().getCenter().toUrlValue());
});
UPDATE 2
It looks like everything works fine when I have the chrome developer tools NOT SET to a DEVICE MODE. The intended usage is on mobile so need to find a way to make this work...