开发者

"Driving" into place effect using javascript / jquery

I have a google map with markers on several states. The markers are 开发者_如何学JAVAtrucks, 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?


$(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/


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜