If you want to suppress the display of tag labels (via KML) on the Google Earth map, you can add LabelStyle to your tags with a scale of 0 (see sn_hide example in the example below). If you want to suppress the tag name on the map until you click on the icon, StyleMaps is your best bet.
The first label in the example below has its name indicated on the places panel, but hidden from the map using LabelStyle. The second label # 2 uses StyleMap to hide the label until the user lights up or accepts with the mouse an icon in which he activates the selection style that displays the label. Third Label # 3 uses the default style, which always displays the label.
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <name>Hide and show labels</name> <Style id="sn_hide"> <LabelStyle> <scale>0</scale> </LabelStyle> </Style> <Style id="sh_style"> <LabelStyle> <scale>1.1</scale> </LabelStyle> </Style> <StyleMap id="msn_hide"> <Pair> <key>normal</key> <styleUrl>#sn_hide</styleUrl> </Pair> <Pair> <key>highlight</key> <styleUrl>#sh_style</styleUrl> </Pair> </StyleMap> <Placemark> <name>Placemark 1</name> <description>Label name always hidden</description> <styleUrl>#sn_hide</styleUrl> <Point> <coordinates>-119.232195,36.016021</coordinates> </Point> </Placemark> <Placemark> <name>Placemark 2</name> <description>Hover over place to show label</description> <styleUrl>#msn_hide</styleUrl> <Point> <coordinates>-119.2324,36.0155</coordinates> </Point> </Placemark> <Placemark> <name>Placemark 3</name> <description>Always showing</description> <Point> <coordinates>-119.232672,36.014837</coordinates> </Point> </Placemark> </Document> </kml>
Jasonm1
source share