0

I have a google map with markers on several states. The markers are trucks, and I'd like to setup an effect of the trucks "driving" in on page load before settling into place.

How can I achieve this affect with jQuery?

dmr
  • 21,811
  • 37
  • 100
  • 138

2 Answers2

1

Here's a good example: http://econym.org.uk/gmap/example_cartrip.htm

your question is a duplicate of this How to animate a custom Google Maps marker along a route? hope this helps

Community
  • 1
  • 1
Ruslan
  • 9,927
  • 15
  • 55
  • 89
  • 1
    "driving in on page before settling into place" does not mean "driving along route" These are map markers for locations, not for directions. – Maverick Aug 10 '11 at 14:27
1
$(function(){
    $('.truck').each(function(i){
        var _this = $(this);
        setTimeout(function(){
            _this.animate({
                left: '300px',
                top: i * 150 + 'px'
            },'easeOutQuint');
        },500 * i);
    });
});

Working demo: http://jsfiddle.net/AlienWebguy/taaxQ/

AlienWebguy
  • 76,997
  • 17
  • 122
  • 145