KML 文档简介
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
如果您刚开始接触 KML,请先浏览 KML 教程,其中包含可在 Google 地球中查看的简短 KML 代码示例。
KML 参考提供了所有 KML 元素的详细语法,以及有关如何指定这些元素的说明和图示。
《开发者指南》包含一些深层次的概念性资料和示例。
创建和共享 KML 文件
您可以使用 Google 地球界面创建 KML 文件,也可以使用 XML 或简单的文本编辑器从头输入“原始”KML。您可以使用 ZIP 格式将 KML 文件及其相关图片(如果有)压缩成 KMZ 归档。要共享 KML 和 KMZ 文件,可以通过电子邮件发送这些文件,或在本地托管以在专有互联网内共享,也可以在网络服务器上公开托管。正如网络浏览器可以显示 HTML 文件一样,Google 地球等地球浏览器可以显示 KML 文件。正确配置服务器并共享 KML 文件的网址(地址)后,安装了 Google 地球的所有用户均可查看您的公开网络服务器上托管的 KML 文件。
许多应用都可以显示 KML,包括 Google 地球、NASA WorldWind、ESRI ArcGIS Explorer、Adobe PhotoShop、AutoCAD 和 Yahoo!管道。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-26。
[null,null,["最后更新时间 (UTC):2025-07-26。"],[[["\u003cp\u003eNew KML users can start with the KML Tutorial for basic code samples and visualization in Google Earth.\u003c/p\u003e\n"],["\u003cp\u003eThe KML Reference offers detailed syntax and explanations for all KML elements.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can find in-depth conceptual material and examples in the Developer's Guide.\u003c/p\u003e\n"],["\u003cp\u003eKML files can be created using Google Earth or text editors, shared via email or web servers, and viewed in various Earth browsers like Google Earth.\u003c/p\u003e\n"],["\u003cp\u003eKML is supported by a wide range of applications, including Google Earth, NASA WorldWind, ESRI ArcGIS Explorer, and more.\u003c/p\u003e\n"]]],[],null,["# KML Documentation Introduction\n\nIf you're new to KML, begin by browsing the [*KML Tutorial*](/kml/documentation/kml_tut), which presents short samples of KML code that you can view in Google Earth.\n\nThe *[KML Reference](/kml/documentation/kmlreference)* provides detailed syntax for all KML elements, with explanations and diagrams of how to specify them.\n\nThe *[Developer's Guide](/kml/documentation/topicsinkml)* contains in-depth conceptual material and examples.\n\nCreating and Sharing KML Files\n------------------------------\n\nYou can create KML files with the Google Earth user interface, or you can use an XML or simple text editor to enter \"raw\" KML from scratch. KML files and their related images (if any) can be compressed using the ZIP format into KMZ archives. To share your KML and KMZ files, you can e-mail them, host them locally for sharing within a private internet, or host them publicly on a web server. Just as web browsers display HTML files, Earth browsers such as Google Earth display KML files. Once you've properly configured your server and shared the URL (address) of your KML files, anyone who's installed Google Earth can view the KML files hosted on your public web server.\n\nMany applications display KML, including Google Earth, NASA WorldWind, ESRI ArcGIS Explorer, Adobe PhotoShop, AutoCAD, and Yahoo! Pipes."]]