Question

I'm working on a KML file for moving a model in space with interpolation (smoothly).

I developed the following code, but it doesn't work. Any suggestion?

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"
xmlns:gx="http://www.google.com/kml/ext/2.2">
<Placemark>
  <name>SketchUp Model</name>
  <description>University.</description>
  <LookAt>
    <longitude>12.491456</longitude>
    <latitude>41.889687</latitude>
    <altitude>6</altitude>
    <range>127.2393107680517</range>
    <tilt>65.74454495876547</tilt>
    <heading>-27.70337734057933</heading>
  </LookAt>    
</Placemark>
<Folder>
<name>Arrivals</name>
<Placemark>
 <name>Modello</name>
   <description>University of Colorado</description>         
     <gx:Track>
   <altitudeMode>relativeToGround</altitudeMode>              
   <when>2010-05-01T13:00:00-05</when>
   <when>2010-05-01T13:00:04-05</when>
   <when>2010-05-01T13:00:08-05</when>
   <when>2010-05-01T13:00:12-05</when>
   <when>2010-05-01T13:00:16-05</when>
   <gx:coord>12.491436 41.889687 0</gx:coord>
   <gx:coord>12.491456 41.889657 0</gx:coord>
   <gx:coord>12.491446 41.889667 0</gx:coord>
   <gx:coord>12.491426 41.889617 0</gx:coord>
   <gx:coord>12.491466 41.889627 0</gx:coord>
   <gx:angles>20 0 0</gx:angles>
   <gx:angles>20 0 0</gx:angles>
   <gx:angles>20 0 0</gx:angles>
   <gx:angles>20 0 0</gx:angles>
   <gx:angles>20 0 0</gx:angles>
   <Model>
      <altitudeMode>relativeToGround</altitudeMode>
      <Location>
          <longitude>12.491456</longitude>
          <latitude>41.889687</latitude>
          <altitude>2</altitude>
      </Location>
      <Orientation>
          <heading>0</heading>
          <tilt>0</tilt>
          <roll>0</roll>
      </Orientation>
      <Scale>
          <x>1.0</x>
          <y>1.0</y>
          <z>1.0</z>
      </Scale>
      <Link>
          <href>models/Citizen Extras_Male 03.dae</href>
      </Link>
</Model>
</gx:Track> 
</Placemark>
</Folder>
</kml>

When I load the html file with fetchKml(...) nothing happens. I only see the globe in space...

Was it helpful?

Solution

If you want to animate any model in Google Earth, you should see these examples: http://www.barnabu.co.uk/geapi/bounce/ http://earth-api-samples.googlecode.com/svn/trunk/examples/event-frameend.html The only way to animate models I know is using KML Tours or working with frameend event

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top