Hi, all.
I found strange behavior of 'setCenter' and 'panBy' function.
When i add event handler to 'zoom_changed' event, something like this:

google.maps.event.addListener(map, 'zoom_changed', function() {
        map.panBy(300, 300);
});

Code above doesn't work.
But if I use 'setTimeout' function like this:

google.maps.event.addListener(map, 'zoom_changed', function() {
        setTimeout(moveMap, 10);
});

function moveMap() {
        map.panBy(300, 300);
}

This code works fine.
Could anybody explain me, why first code snippet doesn't work?

P.S. Sorry for my terrible English.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to