screenOverlayImage static method
- String imageUrl
Generates KML code for a screen overlay image.
imageUrl
is the URL of the image to be overlaid.
Returns a string containing the KML code for the screen overlay image.
Implementation
static String screenOverlayImage(String imageUrl) =>
'''<?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 ="logo">
<name>Space Visualizations</name>
<Folder>
<name>Splash Screen</name>
<ScreenOverlay>
<name>Logo</name>
<Icon><href>$imageUrl</href></Icon>
<overlayXY x="0.5" y="1" xunits="fraction" yunits="fraction"/>
<screenXY x="0.5" y="0.98" xunits="fraction" yunits="fraction"/>
<rotationXY x="0" y="0" xunits="fraction" yunits="fraction"/>
<size x="0.5" y="0" xunits="fraction" yunits="fraction"/>
</ScreenOverlay>
</Folder>
</Document>
</kml>''';