我正在研究一个KML文件,用于在空间中移动模型并进行插值(平滑)。
我开发了以下代码,但它不起作用。有什么建议吗?
<?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>
当我用fetchKml(...)加载html文件时,没有任何反应。我只看到太空中的地球......
答案 0 :(得分:1)
如果您想为Google地球中的任何模型制作动画,您应该看到以下示例: http://www.barnabu.co.uk/geapi/bounce/ http://earth-api-samples.googlecode.com/svn/trunk/examples/event-frameend.html 我知道的模型动画的唯一方法是使用KML Tours或使用frameend事件