KmlBalloonStyle Class

Version 1.0.0-beta002
.NET Framework 4.7
Namespace Skybrud.Essentials.Maps.Kml.Styles
Assembly Skybrud.Essentials.Maps.dll
Visibility Public
Inheritance

Specifies how the description balloon for placemarks is drawn. The <bgColor>, if specified, is used as the background color of the balloon.

public class KmlBalloonStyle : KmlColorStyle { }

Properties

Type Name Summary
String BackgroundColor

Gets or sets the background color of the balloon (optional). Color and opacity (alpha) values are expressed in hexadecimal notation.

String TextColor

Gets or sets the foreground color for text. The default is black (ff000000).

String Text

Gets or sets the text displayed in the balloon. If no text is specified, Google Earth draws the default balloon (with the Feature <name> in boldface, the Feature <description>, links for driving directions, a white background, and a tail that is attached to the point coordinates of the Feature, if specified).

String DisplayMode

If set to is default, Google Earth uses the information supplied in KmlBalloonStyle.Text to create a balloon. If set to hide, Google Earth does not display the balloon. In Google Earth, clicking the List View icon for a Placemark whose balloon's KmlBalloonStyle.DisplayMode is hide causes Google Earth to fly to the Placemark.

String Id (inherited from KmlColorStyle)
String Color (inherited from KmlColorStyle)

Color and opacity (alpha) values are expressed in hexadecimal notation. The range of values for any one color is 0 to 255 (00 to ff). For alpha, 00 is fully transparent and ff is fully opaque. The order of expression is aabbggrr, where aa=alpha (00 to ff); bb=blue (00 to ff); gg=green (00 to ff); rr=red (00 to ff). For example, if you want to apply a blue color with 50 percent opacity to an overlay, you would specify the following: <color>7fff0000</color>, where alpha=0x7f, blue=0xff, green=0x00, and red=0x00.

KmlColorMode ColorMode (inherited from KmlColorStyle)

Values for KmlColorStyle.ColorMode are Normal (no effect) and Random. A value of Random applies a random linear scale to the base KmlColorStyle.Color as follows:

  • To achieve a truly random selection of colors, specify a base of white (ffffffff).
  • If you specify a single color component (for example, a value of ff0000ff for red), random color values for that one component (red) will be selected. In this case, the values would range from 00 (black) to ff (full red).
  • If you specify values for two or for all three color components, a random linear scale is applied to each color component, with results ranging from black to the maximum values specified for each component.
  • The opacity of a color comes from the alpha component of and is never randomized.