開發人員指南
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
本節包含關於 KML 主要元素與使用方式的其他網頁。
- KMZ 檔案已更新
瞭解如何將 KML 檔案及其所有的相關圖片、疊加層、圖示和音效檔案封裝為單一 dty 單元,然後以單一實體的形式張貼或透過電子郵件傳送。
- 多功能
- Google 地球 5.0 版導入了巡航模式:透過 KML 控制的太空和移動移動方式。與導覽相關的元素則包含在 Google 擴充功能的命名空間中。
- 高度模式
- Google 地球 5.0 版導入元素後,Google 地球 5.0 就能利用新版 clampToSeaFloor 和相對於 ToSeFloor 高度模式,帶領觀眾進入水源世界。本章節也會討論傳統的地上模式。
- 時間和動畫
- KML 的任何特徵皆可有時間資料,如果 KML 檔案包含有 TimeSpan 或 TimeStamp 元素的「地圖項目」,「Google 地球」就會顯示時間滑桿。使用者可以利用滑桿和播放按鈕「播放」整個序列,或個別選擇顯示的時間範圍。
- 相機
- 「相機」元素提供另一種指定地圖項目檢視點的方法。相機會與 PhotoOverlays 搭配使用,也就是 KML 2.2 中添加的另一項功能。<Camera> 提供 6 自由度的視圖自由度控制選項,因此您可以將相機放置在空間內,然後沿著 x、y 和 z 軸旋轉。
- PhotoOverlays
- PhotoOverlay 元素可讓您在地理位置上找出相片的地理位置,並且指定檢視此 PhotoOverlay 的相機位置和方向。PhotoOverlay 可以是簡單的 2D 矩形、局部或完整圓柱體或球體 (用於球型全景)。PhotoOverlay 的 ImagePyramid 子元素可以有效處理 Google 地球中任意大型的相片。
- KML 中的 Sky 資料
- 你現在可以在 Google 地球中顯示天體資料。本頁說明如何設定 KML 檔案以檢視天空,並提供轉換標準座標轉換為 Google 地球或天空模式的相關提示。
- 新增自訂資料
- 根據自訂資料類型,您可以透過三種方式,將自訂資料新增至 KML 功能。新的 ExtendedData 元素可讓您將自己的未輸入資料、輸入的資料或任意 XML 資料新增至 KML 功能。Google 地球會保留這些資訊與檔案。未輸入的資料和已輸入的資料都含有顯示元素,可用於樣式範本和氣球中的實體替換功能。
- 模型
- 3D 物件可以在自己的座標空間中自然模擬,然後匯出成 COLLADATM 檔案,然後匯入 Google 地球並放到地球表面上。
- 地區
- 地區可用來提供詳盡且精細程度的行為,可讓您調整在 Google 地球中呈現資料的方式。地區搭配 NetworkLinks 使用時,可串流傳輸超大型資料集,並以智慧型的方式「載入」多個解析度解析度的資料 (請參閱「超大型疊加層」一節的說明)。此外,您也可以使用「區域」模擬 Google 地球的圖層。
- 更新
- 您可以逐步更新 NetworkLinks 所載入的資料,包括變更、新增及刪除先前載入至 Google 地球的 KML 資料。
- 效期
- 本頁面將說明如何使用 HTTP 標頭和 KML 到期時間,避免 KML 資料過時。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2022-12-20 (世界標準時間)。
[null,null,["上次更新時間:2022-12-20 (世界標準時間)。"],[[["\u003cp\u003eThis section provides further detail on key KML elements and their usage.\u003c/p\u003e\n"],["\u003cp\u003eKML files can incorporate touring, altitude modes, time, animation, and camera viewpoints for features.\u003c/p\u003e\n"],["\u003cp\u003eFeatures can include photo overlays, sky data, custom data, 3D models, and regions for enhanced visualization.\u003c/p\u003e\n"],["\u003cp\u003eNetworkLinks support data updates and can leverage regions for efficient streaming and level-of-detail management.\u003c/p\u003e\n"],["\u003cp\u003eKML data freshness can be controlled using HTTP headers and expiration times to prevent staleness.\u003c/p\u003e\n"]]],[],null,["# Developer's Guide\n\nThis section includes pages with additional information on key KML elements and how to use them.\n\n[KMZ Files](/kml/documentation/kmzarchives)^Updated^\n: Learn how to package up (and compress) your KML file and all its related images, overlays, icons, and sound files into one tidy unit that can be posted or emailed as a single entity.\n\n[Touring](/kml/documentation/touring)\n: Google Earth 5.0 introduces touring: KML-controlled movement through space and time. Touring-related elements are contained in the Google extension namespace.\n\n[Altitude Modes](/kml/documentation/altitudemode)\n: With the introduction of elements in the Google extension namespace, Google Earth 5.0 can take viewers underwater with new clampToSeaFloor and relativeToSeaFloor altitude modes. This chapter also discusses the traditional, above-ground modes.\n\n[Time and Animation](/kml/documentation/time)\n: Any Feature in KML can have time data associated with it. When a KML file contains a Feature with TimeSpan or TimeStamp elements, Google Earth displays a time slider. Using the slider and play button, the user can \"play\" the entire sequence or can select individual time periods for display.\n\n[Cameras](/kml/documentation/cameras)\n: The Camera element provides an additional way to specify the viewpoint for a Feature. Cameras are used with PhotoOverlays, another feature added in KML 2.2. \\\u003cCamera\\\u003e provides full six-degrees-of-freedom control over the view, so you can position the Camera in space and then rotate it around the *x* , *y* , and *z* axes.\n\n[PhotoOverlays](/kml/documentation/photos)\n: The PhotoOverlay element allows you to geographically locate a photograph on the Earth and to specify the placement and orientation of the Camera that views this PhotoOverlay. The PhotoOverlay can be a simple 2D rectangle, a partial or full cylinder, or a sphere (for spherical panoramas). The ImagePyramid child element of PhotoOverlay provides for efficient handling of arbitrarily large photographs in Google Earth.\n\n[Sky Data in KML](/kml/documentation/kmlsky)\n: Now you can display celestial data in Google Earth. This page describes how to set up your KML file to view the sky, with tips on converting standard celestial coordinates to display in Google Earth, Sky mode.\n\n[Adding Custom Data](/kml/documentation/extendeddata)\n: You can add custom data to KML Features in three different ways, depending on the kind of custom data. The new ExtendedData element allows you to add your own untyped data, typed data, or arbitrary XML data to a KML Feature. Google Earth preserves this information along with the file. Untyped data and typed data contain display elements that can be used for style templates and entity replacement in the balloon.\n\n[Models](/kml/documentation/models)\n: Three-dimensional objects can be modeled naturally in their own coordinate space and exported as COLLADA™ files, then imported into Google Earth and placed on the Earth's surface.\n\n[Regions](/kml/documentation/regions)\n: Regions provide culling and level-of-detail behavior that allow you to fine-tune how your data is presented in Google Earth. When used with NetworkLinks, Regions enable streaming of very large datasets, with \"smart\" loading of data at multiple levels of resolution (see the section on [Super-Overlays](/kml/documentation/regions#superoverlays)). You can also simulate Google Earth's layers using Regions.\n\n[Updates](/kml/documentation/updates)\n: You can incrementally update data loaded by NetworkLinks---changing, adding, and deleting KML data that was previously loaded into Google Earth.\n\n[Expiration](/kml/documentation/expiration)\n: This page discusses how to prevent KML data from becoming stale, through the use of HTTP headers and KML expiration times."]]