Home > Articles > Web Services > XML

  • Print
  • + Share This
This chapter is from the book

The Copy-and-Paste Trick

If you want to view the KML for a particular Google Earth folder or placemark, you can easily copy the feature from Google Earth and paste it into a text editor such as NotePad. (It’s somewhat counterintuitive that you can copy a graphical feature from Google Earth’s 3D viewer and, when you paste it into a text editor, it’s converted to its corresponding KML textual format, but try it—it works!) Follow these steps to view the KML for a visible feature such as a Placemark, GroundOverlay (image laid on top of the basic Earth terrain), Polygon (shape), or LineString (path) in Google Earth.

  1. In the 3D viewer (or Places panel) of Google Earth, place your cursor over the feature to highlight it.
  2. Right-click and select Copy from the drop-down menu that appears.
  3. Open a simple text editor and paste the contents of the clipboard; for example, by selecting Edit > Paste from the text editor menu.

    The KML for the selected feature appears in the text editor. (Be sure to use a text editor that does not add extra formatting or information to the text file.)

  4. Save the file with a .kml extension in the filename (for example, myHouseInPhila.kml).
  • + Share This
  • 🔖 Save To Your Account