The size, color and opacity of icons and lables in KML can all be specified. They are defined as child elements of <IconStyle> and <LabelStyle>. Similarly, the properties of description balloons can be defined using <BalloonStyle>. How features are displayed in the list (in the sidebar) can be defined through <ListStyle>.
New KML:
<BalloonStyle>
<bgColor>
<displayMode>
<hotSpot>
<Icon>
<IconStyle>
<key>
<labelColor>
<LabelStyle>
<listItemType>
<ListStyle>
<Pair>
<scale>
<Snippet>
<Style>
<StyleMap>
<styleUrl>
<text>
<textcolor>
(1) Create a Placemark at Buckingham Palace (Latitude 51°30'3.53"N, Longitude 0°8'31.36"W).
(2) Name your <Placemark> I see the Queen and save the KML as BuckHouse.kml.
(3) Open BuckHouse.kml in a text editor.
(4) Rename the <Document> as Buckingham Palace.
(5) Delete all content between and including <LookAt>.
(6) Look at the KML and note the use of "id" within the <Style> element. All elements derived from Object can have an id assigned to them (it is a standard XML ID). Use of id allows defined <Style> elements to be shared by multiple objects, e.g., a collection of placemarks. This is done using <styleUrl>.
(7) You should notice that the KML actual defines two sets of <Style></Style> elements. Delete one of them (and the contents within) and rename id of the other as "Lizzy".
(8) Delete all content between and including <StyleMap> and <Hotspot>.
(9) Identify the <styleUrl> and change the referenced id to Lizzy. Note the use of the # symbol.
(10) Save the file as QueenHome.kml and view in Google Earth.
(11) Open the properties dialog box and select the Style,Color tab.
(12) Change the values of color, scale, opacity for both the label and icon.
(13) Save the file as QueenHome.kml (overwrite) and open in a text editor.
(14) Identify the new child elements you have added to style. Also note the use of <href> linking to an image used as the <Icon>.
(15) Change elements in <IconStyle> to use this icon (http://earth.images.alaska.edu/kml/images/flag.gif) with a size of 4.0.
(16) Change elements in <LabelStyle> so the label is red with 50% opacity.
(17) Save the file as QueenHome.kml and view in Google Earth.
(18) It is also possible to change the position within the icon that is "anchored" to the <Point> specified in <Placemark>. This is done within <hotSpot>. Read the KML documentation on this element and experiment.
(19) Move the cursor over the placemark icon and observe closely what happens
(20) The <Placemark> is making use of the different styles (with different icon sizes) by mapping them to the same <Placemark>. Open BuckHouse.kml in a text editor.
(21) Open QueenHome.kml in a text editor and copy the style you defined as id="Lizzy".
(22) In BuckHouse.kml replace (by pasting over) the style with id="sh_ylw-pushpin" with the Lizzy style.
(23) The mapping of styles is done by <StyleMap>. The id of StyleMap is then referenced by the <styleUrl> child in <Placemark>. Change the appropriate value of the <styleUrl> child element in <StyleMap> to Lizzy.
(24) Change <Document> and <Placemark> names as you did for QueenHome.kml.
(25) Save your file as BuckHouse.kml and open in Google Earth.
(26) Move the cursor over the placemark's icon and check that the style changes.
(27) Open QueenHome.kml in a text editor.
(28) Similar to <IconStyle> and <LabelStyle> add a <BalloonStyle> element into <Style>.
(29) Add <bgColor> and <textColor> as child elements of <BalloonStyle>. Add values for color and opacity according to the conventions described before.
(30) Save and view in Google Earth. This is an example of KML that cannot be edited through Google Earth client GUIs.
(31) Create a folder in My Places
(32) Add 3 or more placemarks to this folder
(33) Open the folder's properties dialog box and check the Show contents as option box
(34) Try selecting different placemarks in the folder
(35) Save as radio.kml and open in a text editor
(36) Within the <ListStyle> element there are now two new child elements shown:
<bgColor> Specifies a background color for the <Snippet>
<listItemType> Specifies how a Feature is displayed in the list view. Possible values are:
(A) Create a radioFolder containing five placemarks that label five different countries. Give the placmarks icons/labels of varying sizes and colors. When you pass your cursor over the placemark icons they should change to that country's flag.
(B) For the placemarks created in (A) remove the to/from directions from the description balloons. Make all description balloons grey; containing the placemark's (country's) name in white and a photo from that country.