1

I am teaching a new course called Global Studies, which looks at many aspects of various regions of the world. As in introduction to each region, I plan on making a Google Earth tour with information, pictures, video, etc... That part I know how to do, but I want to "polish" it. I want to open the balloon once the student arrives at a location and I want the tour to pause. I want the balloon to close when the tour is contninued.

From research, I learned that I need to edit the kml file (located inside the kmz file - accessed via zip). I need to add the appropriate code:

(Turning on Balloon)
       <gx:AnimatedUpdate>
          <Update>
            <targetHref/>
            <Change>
              <Placemark targetId="BLAHBLAHBLAH">
                <gx:balloonVisibility>1</gx:balloonVisibility>
              </Placemark>
            </Change>
          </Update>
        </gx:AnimatedUpdate>

(Pausing)

<gx:TourControl>
    <gx:playMode>pause</gx:playMode>
</gx:TourControl>

(Turning off Balloon)
       <gx:AnimatedUpdate>
          <Update>
            <targetHref/>
            <Change>
              <Placemark targetId="BLAHBLAHBLAH">
                <gx:balloonVisibility>0</gx:balloonVisibility>
              </Placemark>
            </Change>
          </Update>
        </gx:AnimatedUpdate>

The issue I have is that I can't seem to figure out WHERE to place it within the doc.kml. The examples show simple "flyto" commands for each location. The doc.kml in the kmz file has way more flyto's than my 16 locations. If I search for the lat/long, there are huge numbers as well. If I search for the location/placemark names, they are only found in the beginning of the file, where there are no flyto statements.

Is there a way I can figure out where to place the code to achieve the polished look I am trying to accomplish? My kmz file can be found here. I want to learn how to do this, so in the future I can do it with other tours and other regions.

2 Answers 2

1

To Pause

Define the Tour <gx:Tour>

Define Playlist (does the order)

<gx:Playlist>

call the wait/pause (in seconds):

<gx:Wait>
  <gx:duration>10</gx:duration>
</gx:Wait>

Then fly to:

<gx:FlyTo>
  <gx:duration>5</gx:duration>
  <gx:flyToMode>bounce</gx:flyToMode>
  <LookAt>
    <longitude>-79.387</longitude>
    <latitude>43.643</latitude>
    <altitude>0</altitude>
    <heading>-172.3</heading>
    <tilt>10</tilt>
    <range>1200</range>
    <altitudeMode>relativeToGround</altitudeMode>
  </LookAt>
</gx:FlyTo>

Full official documentation: https://developers.google.com/kml/documentation/touring#pausing

1
  • Thanks, but I still don't know where to place the code in the doc.kml file. As I stated, There are WAY more FlyTo statements and multiple lati/long listings than my 16 locations. I understand the codes I need to insert, I just can't figure out where in the doc.kml it has my arrival at each point, so that I can insert the code there. The GE produced doc.kml seems to be full of a lot of extra commands, thus confusing me.
    – Kazimierz
    Aug 19, 2013 at 15:45
0

Because of all the extra stuff that Google Earth places in the file, I purposely waited a few seconds at each location while recording. I then opened the doc.kml file in Notebook++ and searched for "wait". There are many wait statements, but those that were over a minute indicated my wait at each location, so showed me where to place the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.