下图说明了游览基元根据时间轴进行的行为。该图下方列出了代表各着色部分的代码,以供参考。本网页链接到《KML 开发者指南》中游览一章的游览时间轴部分。
![](https://developers-dot-devsite-v2-prod.appspot.com/static/kml/documentation/images/tourtimeline_large.png?authuser=8&hl=zh-cn)
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2"> <gx:Tour> <name>Tour timeline example</name> <gx:Playlist> | |
1 | <gx:FlyTo> <gx:duration>2</gx:duration> <gx:flyToMode>bounce</gx:flyToMode> ... </gx:FlyTo> |
2 | <gx:SoundCue> <href>/path/to/file.mp3</href> <!-- sound file is 7 seconds long --> </gx:SoundCue> <gx:FlyTo> <gx:duration>5</gx:duration> <gx:flyToMode>bounce</gx:flyToMode> ... </gx:FlyTo> |
3 | <gx:TourControl> <gx:playMode>pause</gx:playMode> </gx:TourControl> <gx:AnimatedUpdate> <gx:duration>7</gx:duration> <Update> <Change> ... </Change> </Update> </gx:AnimatedUpdate> <gx:FlyTo> <gx:duration>5</gx:duration> <gx:flyToMode>smooth</gx:flyToMode> ... </gx:FlyTo> |
4 | <gx:Wait> <gx:duration>1</gx:duration> </gx:Wait> |
5 | <gx:AnimatedUpdate> <gx:duration>5</gx:duration> <Update> ... </Update> </gx:AnimatedUpdate> <gx:FlyTo> <gx:duration>3</gx:duration> <gx:flyToMode>bounce</gx:flyToMode> ... </gx:FlyTo> |
</gx:Playlist> <gx:Tour> </kml> |