KML 導覽時間軸範例
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
<< 返回 KML 中遊覽
下圖說明遊覽基本功能沿著時間軸移動的行為。代表不同顏色部分的程式碼,列在圖表下方以供參考。這個網頁連結至 KML 開發人員指南中「導覽」章節的「導覽時間表」一節。
|
<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> |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2022-12-20 (世界標準時間)。
[null,null,["上次更新時間:2022-12-20 (世界標準時間)。"],[[["\u003cp\u003eThe diagram visually demonstrates how tour primitives like FlyTo, SoundCue, TourControl, AnimatedUpdate, and Wait behave over a timeline within a KML Tour.\u003c/p\u003e\n"],["\u003cp\u003eEach colored section of the diagram corresponds to a specific code snippet provided beneath it for easier understanding and reference.\u003c/p\u003e\n"],["\u003cp\u003eThe diagram helps visualize the timing and sequencing of different tour elements, including fly-to animations, sound cues, pauses, and animated updates.\u003c/p\u003e\n"],["\u003cp\u003eThis visual representation aids in understanding how KML elements are used to create dynamic and interactive tours in Google Earth.\u003c/p\u003e\n"]]],[],null,["# KML Tour Timeline Example\n\n[\\\u003c\\\u003c Back to Touring in KML](/kml/documentation/touring#tldiagram)\n\nThe following diagram illustrates the behavior of tour primitives along a timeline. The code representing each colored section is included beneath the diagram for reference. This page is linked to from the [Tour timelines](/kml/documentation/touring#tourtimelines) section of the **Touring** chapter of the **KML Developer's Guide**.\n\n|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | ``` \u003ckml xmlns=\"http://www.opengis.net/kml/2.2\" xmlns:gx=\"http://www.google.com/kml/ext/2.2\"\u003e \u003cgx:Tour\u003e \u003cname\u003eTour timeline example\u003c/name\u003e \u003cgx:Playlist\u003e ``` |\n| 1 | ``` \u003cgx:FlyTo\u003e \u003cgx:duration\u003e2\u003c/gx:duration\u003e \u003cgx:flyToMode\u003ebounce\u003c/gx:flyToMode\u003e ... \u003c/gx:FlyTo\u003e ``` |\n| 2 | ``` \u003cgx:SoundCue\u003e \u003chref\u003e/path/to/file.mp3\u003c/href\u003e \u003c!-- sound file is 7 seconds long --\u003e \u003c/gx:SoundCue\u003e \u003cgx:FlyTo\u003e \u003cgx:duration\u003e5\u003c/gx:duration\u003e \u003cgx:flyToMode\u003ebounce\u003c/gx:flyToMode\u003e ... \u003c/gx:FlyTo\u003e ``` |\n| 3 | ``` \u003cgx:TourControl\u003e \u003cgx:playMode\u003epause\u003c/gx:playMode\u003e \u003c/gx:TourControl\u003e \u003cgx:AnimatedUpdate\u003e \u003cgx:duration\u003e7\u003c/gx:duration\u003e \u003cUpdate\u003e \u003cChange\u003e ... \u003c/Change\u003e \u003c/Update\u003e \u003c/gx:AnimatedUpdate\u003e \u003cgx:FlyTo\u003e \u003cgx:duration\u003e5\u003c/gx:duration\u003e \u003cgx:flyToMode\u003esmooth\u003c/gx:flyToMode\u003e ... \u003c/gx:FlyTo\u003e ``` |\n| 4 | ``` \u003cgx:Wait\u003e \u003cgx:duration\u003e1\u003c/gx:duration\u003e \u003c/gx:Wait\u003e ``` |\n| 5 | ``` \u003cgx:AnimatedUpdate\u003e \u003cgx:duration\u003e5\u003c/gx:duration\u003e \u003cUpdate\u003e ... \u003c/Update\u003e \u003c/gx:AnimatedUpdate\u003e \u003cgx:FlyTo\u003e \u003cgx:duration\u003e3\u003c/gx:duration\u003e \u003cgx:flyToMode\u003ebounce\u003c/gx:flyToMode\u003e ... \u003c/gx:FlyTo\u003e ``` |\n| | ``` \u003c/gx:Playlist\u003e \u003cgx:Tour\u003e \u003c/kml\u003e ``` |"]]