Google 會運用 AI 技術將內容翻譯成您偏好的語言,但可能會出錯。
顯示 KML 資料
透過集合功能整理內容
您可以依據偏好儲存及分類內容。
資料集資料導向樣式
您可以將 KML 資料上傳為資料集,並使用資料導向樣式在地圖上顯示。這種做法可提供更佳的效能和更多樣式選項。
如要開始使用資料集,請參閱「資料集總覽」。
第三方程式庫
您也可以使用第三方程式庫在瀏覽器中剖析 KML 檔案,並使用 Maps JavaScript API 的資料層或其他疊加層顯示資料。
用於剖析 KML 的熱門第三方程式庫包括:
將 KML 資料轉換為 GeoJSON 後,您可以使用 map.data.addGeoJson() 將資料載入資料層。
[null,null,["上次更新時間:2026-12-03 (世界標準時間)。"],[],["This tutorial demonstrates how to display KML file information on a Google Map and in a sidebar. Key actions include: initializing a Google Map, creating a `KmlLayer` object to load a KML file from a URL, and configuring the layer to suppress info windows. An event listener is added to capture clicks on KML features. When a click occurs, the feature's `infoWindowHtml` content is extracted and used to update the content of a designated sidebar `div`, dynamically displaying the selected feature's information.\n"]]