Ví dụ về dòng thời gian tham quan KML
Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
<< Quay lại phần Tham quan trong KML
Sơ đồ dưới đây minh hoạ hành vi của các truy cập gốc trong suốt tiến trình. Mã đại diện cho từng phần được tô màu bên dưới sơ đồ để tham khảo. Trang này được liên kết đến từ phần Tiến trình tham quan trong chương Tham quan của Hướng dẫn dành cho nhà phát triển 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> |
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2022-12-20 UTC.
[null,null,["Cập nhật lần gần đây nhất: 2022-12-20 UTC."],[[["\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 ``` |"]]