7

Can anyone suggest how I can access then animate the red polyline here using javascript:

http://gymloop.lukem.co.uk (login: User2/pass2, then select 'Challenges')

I want to animate the polyline from the first marker to the end of the red line (think Indiana jones but without the map moving and NOT using google maps). It needs to be dynamic as different users will have travelled different distances.

I need thew solution to work in FF, IE7+ & Chrome

I am using cloudmade's leaflet maps and am keen to avoid using google maps.

There is further information in my related question at gis.stackexchange

4

2 に答える 2

13

コードを確認しましたが、リーフレット API を使用して線を描画しているようです。そのため、この種の線をアニメーション化するやや一般的な関数を作成することにしました。(ちなみに、なぜその API が行タグではなくパス タグを使用するのか混乱していますが、私はそれで転がりました。)

コードは次のとおりです。http://jsfiddle.net/mihaibirsan/Wzvre/

もう少し磨きをかけたいところですが、その恩恵の扉に足を踏み入れたかったのです。:D (他の作業を行ったら、数時間後に磨きに戻り、更新を投稿します。)

于 2011-10-27T15:17:48.040 に答える