How can I have a smooth animated move between 2 Google Maps locations?

Posted by pelms on Stack Overflow See other posts from Stack Overflow or by pelms
Published on 2010-01-21T10:16:42Z Indexed on 2010/05/31 2:52 UTC
Read the original article Hit count: 242

When clicking from one marker to another in Google Maps, the map screen animates the move smoothly if both markers are within them initial map view but jumps if one of the markers is off screen.

I'm trying to set up a map which has several locations within the main map area but has one which is 'off screen'. I have a signpost icon to the more distant location within the initial map area which I want to smoothly scroll to the off screen location when clicked (so as to give a better sense of it's relative location). I can't find anything in the Maps API which would let me do this however.

I could zoom out, move and then zoom in again but this looks a bit jarring. Am I missing something in the API, or does anyone have any suggestions?

© Stack Overflow or respective owner

Related posts about google-maps

Related posts about google-maps-api