2

My project involves kml files that show several sites so I have several placemarks. The first placemark, well off to one side, shows a balloon with descriptive text that is forced to load on start-up, subsequent placemarks in the file identify specific features. I have read the documentation file: https://developers.google.com/kml/documentation/kmlreference#balloonstyle but I guess I don't understand it.

The doc file says: "To prevent the driving directions links from appearing in a balloon, include the element with some content, or with $[description] to substitute the basic Feature ." Alas, including the text element in BalloonStyle does nothing. If description is not included or is in BalloonSdozentyle, the icon cannot be selected (the cursor remains the hand). If description is there, so is "Directions:" in the balloon.

My kml file

http://www.pinacate.org/kmlfiles/hydrovolcanic.kml

shows a dozen icons. The intro balloon is forced to display by gx:balloonVisibility and shows without "Directions:" but when closed and then reopened using the "Hydrovolcanic" icon on the left, it has directions. Sykes Maar and Cerro Colorado maar cannot be selected. All the selectable icons show "Directions:" in the balloon. I cannot figure out how to turn it off.

1 Answers1

2

Problem solved:

I hope I'm a better geologist than I am a coder. By trial and error, I finally found that "Directions:" is suppressed by putting the following code in the STYLE definition and not in the placemarks. In retrospect, it makes sense.

I wrapped $[description] in "text" tags and that in "BalloonStyle tags, all inside the "style" tag e.g.

<Style id="blahblah">
    ...
    <BalloonStyle>
        <text>$[description]</text>
    </BalloonStyle>
    ...
</Style>

See https://developers.google.com/kml/documentation/kmlreference?csw=1#balloonstyle for more information.

kmort
  • 2,848
  • 2
  • 32
  • 54