Pages

Tuesday, August 10, 2010

Big Update: How to Create a Legend in Google Earth

This is a big update from an old post.  Now it is possible to simply copy and paste the code into Notebook.

For my Russia-Georgia War maps I had a fixed non-movable legend in the bottom left corner of the screen. I preferred the legend because it provided a solid reminder of what date was being shown and it promoted the blog.

First, create a legend in an image editing software and save as an image file like .jpg, .bmp, or .gif. Second, open Notepad. Then type/copy in the code below into Notepad.

Only the name, description, and icon data need to be changed. The icon path should be something like "c:\maps\russiageorgia\legend.jpg

<ScreenOverlay id=”legend”>
<name>Give the file a display name</name>
<description>Write what you want displayed in the properties textbox</description>
<Icon><href>Write the path to the legend image</href></icon>
<overlayXY  x=”0” y=”.055” xunits=”fraction” yunits=”fraction”/>
<screenXY  x=”0” y=”.055” xunits=”fraction” yunits=”fraction”/>
<rotation>0</rotation><size x=”0” y=”0” xunits=”pixels” yunits=”pixels”/>
</ScreenOverlay>
When the text is inserted save the file as something like "legend.kml". Make sure the file is not saved as a text file. Now go into Google Earth and open the saved kml file. Your legend should be displayed. Using Google Earth you can make it change how opaque it is.

No comments: