generateOrbitBalloon static method

String generateOrbitBalloon(
  1. String name,
  2. String description
)

Generates a KML balloon with a custom description and name of an orbit.

Returns a string containing the KML balloon.

Implementation

static String generateOrbitBalloon(String name, String description) {
  description = description.replaceAll('\n', '<br>').replaceAll('\'', '’');

  return KMLMakers.screenOverlayBalloon(
      '''<div style="width: 480px; color: white; padding-left: 10px; padding-right: 10px;">
    <center>
       <h1 style="color:white; font-size: 28px;">$name Orbit</h1>
      <p style="color:white; font-size: 18px;">$description</p>
      <br>
      <p style="color:white; font-size: 15px;">Space Visualizations | Liquid Galaxy | GSoC 2024</p>
    </center>
    </div>''');
}