The following screenshots show how this KML file is rendered in Google Earth.
<?xml version="1.0" encoding="utf-8"?> <kml> <Document> <name>Example of displaying a local image file</name> <Placemark> <name>Monaco</name> <Snippet>Photo 1</Snippet> <description><![CDATA[ <img src='file:///c:\temp\monaco\IMG_5523.jpg' width='400' /><br/> Photo taken from near the palace in Monaco<br/> ]]> </description> <Point> <coordinates>7.421630,43.731459</coordinates> </Point> </Placemark> </Document> </kml>
Monday, February 11, 2013
Example KML for displaying a photo image from the local disk
Recently I had to generate some Google Earth KML files for displaying photos from a local hard drive in a Placemark balloon. In order to display local images not from a web server, the file keyword must be used with 3 forward slashes in the HTML img tag followed by the full path of the photo file, as shown in the example KML code below.