Hello.
I have some questions about manipulating the KML tour controls in
Google Earth.
I'm using Adobe Flex to load a KML tour onto Google Earth. It's for a
Kiosk so I want to
a) hide the controller that loads on the map, and
b) provide buttons that will simply allow a user to move the tour
forward and back.
Here's the kiosk I'm working on:
-
http://wickedsmartstudios.com/mnh/kiosk_newengland_wss_090702/
(Click on the "No Flooding" button to load the tour, then hold down
the "forward" button on top to make it run.)
Here's a link to the .mxml, and to the .js files. (Forgive me if the
code is a bit messy ... I'm new at this, am learning and cobbling
things together and plan to clean it up after I've conquered some of
the basic functionality.)
-
http://wickedsmartstudios.com/mnh/kiosk_newengland_wss_090702/GoogleMaps.mxml
-
http://wickedsmartstudios.com/mnh/kiosk_newengland_wss_090702/js/asagm.js
* * *
TWO CHALLENGES FOR ME:
1. Hide or remove controller on map.
I've searched high and low and still have no idea how to accomplish
this.
* * *
2. Program a "Rewind" button to control the KML tour
I found the code online for "forward" (
http://code.google.com/apis/
earth/documentation/reference/interface_g_e_tour_player.html), and
found that all the GETourPlayer control code looks basically like
this:
function playTour() {
ge.getTourPlayer().play();
}
But I can't find a similar function for "back" or "reverse". It seems
like it would be something simple like this:
function rewindTour() {
ge.getTourPlayer().rewind();
}
I tried a couple of other terms but didn't find it. I know it's
possible to go back because you can do it from the controls on the
map.
* * *
So the next thing I considered was writing a function that tells the
tour to "play", but negatively... does that make sense? some kind of
"play -1" loop? Or "gotoPreviousLocation" that fires repeatedly as
long as the mouse is down?
Here's a working example of that method:
http://footstepsofthebuddha.googlepages.com/footstepsofthebuddha2
(
http://groups.google.com/group/google-earth-browser-plugin/
browse_thread/thread/115ecf2f42509fb5)
* * *
Here's one other option I've considered:
The comma key fires the "reverse" function I'm looking for. (Try
running the tour from the controller on the map and then selecting the
comma key. The tour will begin running in reverse.) Is there some way
to find out what function it's calling and appropriate that for my
use?
* * *
I appreciate your thoughts,
Killer