« 3D Models for the Weekend | Main | Sailblogs.com Supports Google Earth »

7 de Abril 2006

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>

Enviado por FrankTaylor at 7 de Abril 2006 a las 01:05 PM

  • Google Earth Blog © 2005, 2006, 2007 Copyright de Frank Taylor. Todos los Derechos Reservados.
  • Todas las imágenes de Google Earth capturadas de pantalla son Copyright de Google


  • Comentarios

    Envíe un Comentario:

    NOTA: Use español o Inglés. Los Comentarios son revisados previa publicación.




    Recordarme?