Keyhole Markup Language (KML) is an XML-based markup language designed to annotate and overlay visualizations on various two-dimensional, Web-based online maps or three-dimensional Earth browsers (such as Google Earth). In fact, KML was initially developed for use with Google Earth; because that project was originally named Keyhole, as was the company that undertook this work, the related markup language followed suit. When Google acquired Keyhole in 2004, that project came with it and eventually became Google Earth. The "keyhole" moniker is a reference to the original KH military reconnaissance satellites first launched in the mid-1970s that took the very first "eye-in-the-sky" photographs so commonly viewed within Google Earth and other geobrowsers.
A KML file includes specifications for various features for display within Google Earth, Maps and Mobile, and other three-dimensional Earth or geobrowser programs. KML's feature set includes placemarks, 3D models, text descriptions, images, polygons, and so forth. Each location has an associated longitude and latitude and view-specific data such as heading, altitude and tilt may be provided to define a so-called "camera view" for geospatial data. KML shares some of its grammar with the geography markup language, or GML, an Open XML markup language defined to express geographical data and features.
The current specification for KML is 2.2, which has been submitted to the Open Geospatial Consortium (OGC) for ratification as an open standard that any geobrowser may use. Because the OGC already has custody over GML, this makes a good fit. KML documents are often distributed in the form of KMZ files, which are nothing more than a zipped KML document inside a file with a .kmz extension. A KMZ file usually contains a single KML document, invariably named "doc.kml" along with images for overlays and icons it may reference internally.