screenOverlayBalloon static method
- String htmlContent
Generates KML code for a balloon overlay.
The balloon overlay includes the HTML content provided.
htmlContent
is a string that contains the HTML content to be displayed in the balloon overlay.
Returns a string containing the KML code for the balloon overlay.
Implementation
static String screenOverlayBalloon(String htmlContent) {
return '''<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document id="balloon">
<name>Balloon</name>
<open>1</open>
<Style id="purple_paddle">
<BalloonStyle>
<text><![CDATA[
$htmlContent
]]></text>
<bgColor>ff1e1e1e</bgColor>
</BalloonStyle>
</Style>
<styleUrl>#purple_paddle</styleUrl>
<gx:balloonVisibility>1</gx:balloonVisibility>
</Document>
</kml>
''';
}