Colored Description Bubbles in KML for Google Earth

Colored Bubble Description in Google EarthIn the new Discovery Channel National Parks placemark collection I noticed they had colored description bubbles in Google Earth. So, I set out to figure out how they did it in the KML. It turns out you need the following KML tags added to a placemark KML file:

  • <Style> – name a style type using the “id” parameter
  • <BalloonStyle> – start a style for the Balloon
  • <color> – specify a color
  • <StyleURL> – specify the Style for a specific balloon.

You need the corresponding closing tag for each of the tags above. Read the documentation on KML here.
You can see an example placemark I placed in the big blue ocean, and here’s the source (the important parts are highlighted in the color red):

<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0">
<Document>
<Style id="bigblue">
<BalloonStyle>
<color>ffa56a</color>
</BalloonStyle>
</Style>
<Placemark>
<name>The Ocean</name>
<description>This is the big blue Atlantic Ocean.</description>
<LookAt id="khLookAt714">
<longitude>-42.26486304831379</longitude>
<latitude>22.39966410949204</latitude>
<range>628332.929568931</range>
<tilt>0.0</tilt>
<heading>0.0</heading>
</LookAt>
<styleUrl>#bigblue</styleUrl>
<Point id="khPoint715">
<coordinates>-42.4724104803559,24.20421380978096,0</coordinates>
</Point>
</Placemark>
</Document>
</kml>

About Frank Taylor

Frank Taylor started the Google Earth Blog in July, 2005 shortly after Google Earth was released. He worked in 3D graphics for many years and was very impressed with this exciting product. Frank left in 2009 to circumnavigate the earth by sailboat as part of the Tahina Expedition.



Leave a Reply