If you are calculating and plotting real-time train locations, you
don't need any kind of polyline animation as such.   You just plot the
trains, and recalculate and re-plot at intervals.

You will need the polyline between stations so that you know where to
plot the trains, though.  From the timetable you could derive the
duration of the leg to the next station.  From your polyline you can
get the distance between stations.  Then you know the speed of the
train, and can calculate how far it has got along that leg at some
given time.  Then you can plot the train position at that distance
along the line.

You'll need some kind of logic to select which of your polylines is
the right one leading away from any given station, that should just
involve checking destination.

I'm not sure how useful is for a traveller to know which trains they
have missed though.  It might be better to look ahead and see which
trains will depart soon, but that depends on what your purpose is.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" 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-js-api-v3?hl=en.

Reply via email to