On May 6, 1:20 pm, "mark.forster" <[email protected]> wrote:
> I'm writing a mashup that uses both the dynamic and static map.
>
> when the dynamic map pans, i want to capture the new lpnitude/
> lattitude to re-request the static image for the new map center.
>
> how do i do this?
>                 map.panDirection(mat.x,mat.y);

panDirection *starts* a map animation, according to the docs [my
emphasis]. The code then immediately carries on and gets the map
centre. At that point, it hasn't moved.

If you want to use panDirection, you'll need to use a moveend event
listener on the map and capture and use the centre when that event is
triggered. You could set a global variable within your move_map
function to indicate that it's that function which has caused the move
-- unset it in the event handler to indicate that it's been dealt
with.

Everything after your panDirection call will need to be inside the
event handler.

Andrew
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to