Current status (play/pause) of Tour Controller?

13 views
Skip to first unread message

James Lamanna

unread,
Sep 20, 2010, 5:14:46 PM9/20/10
to KML Developer Support - Google Earth Plug-in
Hi,
Is there a way to grab the current status of the Tour Controller (i.e.
is it playing or paused)?
There doesn't appear to be one..

Thanks.

fraser (Earth API Guru)

unread,
Sep 27, 2010, 12:25:17 PM9/27/10
to KML Developer Support - Google Earth Plug-in
Hi,

You could easily set a boolean flag for this yourself.
Obviously how you implement this would be dependant on how you have
set up your code.
Basically you would set a variable everytime you start/stop the tour.

e.g.
var isPlaying = false;
...
ge.getTourPlayer().play();
isPlaying = true;
...
ge.getTourPlayer().pause();
isPlaying = false;

Hope that helps,

F.

James Lamanna

unread,
Sep 27, 2010, 7:37:54 PM9/27/10
to KML Developer Support - Google Earth Plug-in
Sure, you can do that, except that if you have a tour that pauses in
the middle (take some of the examples in the Google showcase),
the TourController can pause without your knowledge.
I've implemented a polling model that polls the .currentTime to see
when it has stopped, but to say that this is not elegant would be an
understatement.
Reply all
Reply to author
Forward
0 new messages