Ideally option 1 would work, but sometimes the animation complete
function in JQuery fires before the DOM has actually finished
rendering the animation - especially on older devices/mobile devices.
You could try enclosing the resize in a setTimeout() method, probably
with a generous time on it like 300-750 miliseconds. This will mean
you resize the map THEN panTo the new center.
It would be good if you could show us a link to this - for example
sometimes I've found that by floating the map div in a certain
direction you can make the pan look less awkward.
If you are trying to time it perfectly so the map pans with the
animating div you probably won't be able to. Even though you can
specifcy a time in miliseconds for the animation to take, the time is
more of a rough guide rather than a consistent or precise measure to
sequence events.
On Aug 17, 10:45 am, Répás Zoltán <
marhar...@gmail.com> wrote:
> Hello!
>
> I'd like to make a cute animation for my google maps api.
>
> I have two divs next to each other, one with 0px width.
>
> When I click to a single target the MAP width is scales down, with a jquery animation in 200ms.
> Same time the right sided DIV's width sets from 0 to 500px (200 ms too)
>
> So it looks like, the map is "compressed" by the right-panel.
>
>
marhar...@gmail.com