Google Earth Lessons

An Educational Resource for Teachers

Screen O'lay!

Part 1: The Graphic, Part 2. The KML, Part 3. The Possibilities!

Here's a nifty little trick. With a little work, some creativity and Google Earth you can create unusual and interesting images to engage your students (or friends and family) that float on top of the main window. Here are some examples (click on the pictures for the .kml file that created it):

War!   frame

fire

The pictures that are on the screen of Google Earth are called 'Screen Overlays' and you might have seen them before if you have browsed placemark collections that were created for commercial purposes. But there is a lot more you can do with them and it is REALLY easy!! The trick is actually two made up of two parts...

Part 1. The Graphic. The first trick is the graphic itself. The secret is to create or find a graphic that uses transparency. Without getting into too much detail about transparency, basically there are two types of graphics files that Google Earth supports which support transparency, GIF and PNG.

There are many graphics programs that allow you to take a picture and then choose a transparent color. If you already know how to use your favorite graphics program to create transparency you can skip to part two. If you don't know how to create transparent colors in pictures, then read on.

1a. Creating or finding a picture to use as a screen overlay. What you are looking for are pictures that have large, or specific, areas of a single solid color, a color that is not repeated elsewhere in the picture too much. For instance, in the gold frame example above, everything inside the frame was pure white, so I made the color white transparent, thereby framing the Google Earth display. In the bottom picture, which kind of looks junky, the background was white (and therefore transparent) but there were areas around the flames that were very close to white, but not perfectly white. That is why the flames show the whitish edges.

In the examples above, I first created a 640 x 480 empty picture and then added the stuff. You can, in theory, create any sized file, but bigger pictures will take longer to load and smaller pictures might look blocky or pixilated depending on how much they are stretched.

1b. Selecting the Transparent Color. Once you have found or created your graphic for the overlay, then you can use a 'web-smart' graphics program to set the transparent color. A wonderful, free, utility for that purpose on Windows is Irfanview. On the Mac I always used Graphic Converter (I don't know if there is still a free, limited version available, there used to be). Most professional graphics applications support creating transparent areas as well (Adobe Photoshop, Macromedia Fireworks, CorelDraw, etc.)

For this tutorial, I will be using Irfanview, but the process is similar in other programs. In most graphics programs, the option of selecting a transparent color isn't offered to you until you are at the 'save as...' stage. Save your file as either a .gif (Graphic Interchange Format) or .png (Portable Network Graphic). There are many differences between the two formats. If you are using a picture that has a lot of different colors, choose .png since it supports a lot more colors than .gif. GIF only supports 256 colors and it's main advantage is that all web browsers can read the format. Not all web browsers support .png, so if you want to share your creation on a web page and don't use too many colors, choose .gif.

Here is how the process looks in Irfanview. I had a picture and went File:Save as... In the Save As window I selected PNG

pngsave

At the same time, I made sure that Irfanview knew I wanted transparency.

transparent option

And finally, I selected the transparent color with a simple click.

select color

Part 2: The .kml file.

For the next part you will need a good text editor that supports UTF-8. Word Processing programs such as Microsoft Word will NOT do. For Windows computers try the free TedNotepad, on the Mac use BBEdit (30 day demo) although SimpleText might work too (Mac users, some feedback would be good :-).

Then just copy/paste the KML code below into a blank document and save it with the file extension .kml after deleting the red text and changing the green text to reflect your particular overlay picture.

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<ScreenOverlay>
<name>War!</name> <--Change the name.
<visibility>0</visibility>
<Icon>
<href>P://ATH/TO/YOURPICTURE.png</href> <--This will be the web address where the picture is. See below.
</Icon>
<overlayXY x="0" y="1" xunits="fraction" yunits="fraction"/>
<screenXY x="0" y="1" xunits="fraction" yunits="fraction"/>
<rotationXY x="0" y="0" xunits="fraction" yunits="fraction"/>
<size x="1" y="1" xunits="fraction" yunits="fraction"/> <--This is the fractional size of the overlay. 0.5 would cover half, 0.25 would cover 1/4th, etc. if you want to change how much of the display window is covered by the overlay.
</ScreenOverlay>
</kml>

More information about the XY stuff can be found in the KML Tutorial at Google Earth's site.

One more note before you go off to play around with the trick. The Path part can be the most confusing for some people. If you put your picture for the screen overlay on-line you would use a full web address, such as http://www.xyz.com/picture.png, whereas if you have the picture on your computer, you will need to determine the full path to the file. Then, once you have the path, have saved the file as a .kml and loaded it in Google Earth, in order to share it with others, you would need to click on the screen overlay icon in Google Earth and Save As...

save as

then choosing .kmz as the file type which will bundle the picture into the placemark.

kmz

Part 3: Other Nifty Tricks you can do with Screen Overlays:

Once you know how to create and load screen overlays, there is a lot more you can do with them! For instance, you can bundle them with placemarks of places into a folder and create neat lesson placemark collections that focus student's attention on particurlar areas share information about a lesson on the overlay, all sorts of cool stuff!