Last active
February 28, 2023 18:54
-
-
Save Lmendev/94f4b58cd4987bb608f1 to your computer and use it in GitHub Desktop.
Simple Google Earth KML Balloons with Tabbed Navigation using HTML and JavaScript
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<kml xmlns="http://earth.google.com/kml/2.2"> | |
<Document> | |
<name>Simple balloon tabs example</name> | |
<Folder> | |
<name>Folder</name> | |
<visibility>1</visibility> | |
<Placemark> | |
<name>Balloon tabs example</name> | |
<description> | |
<![CDATA[ | |
<div> | |
<a onClick="switchTab('tab1')">General</a> | |
<a onClick="switchTab('tab2')">Sector</a> | |
</div> | |
<div id="tab1"> | |
<p>tab1</p> | |
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod | |
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, | |
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo | |
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse | |
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non | |
proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> | |
</div> | |
<div id="tab2" style="display: none;"> | |
<p>tab 2</p> | |
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Enim assumenda, | |
possimus vero, dolor eligendi explicabo, ipsam repellendus aut reiciendis, | |
ex dignissimos nisi. Officia numquam quis officiis debitis architecto deserunt impedit?</p> | |
</div> | |
<script type="text/javascript"> | |
function switchTab(currentTab) { | |
document.getElementById("tab1").style.display="none"; | |
document.getElementById("tab2").style.display="none"; | |
document.getElementById(currentTab).style.display="block"; | |
} | |
</script> | |
]]> | |
</description> | |
<Point> | |
<coordinates>-74.8308, 11.0029, 0</coordinates> | |
</Point> | |
</Placemark> | |
</Folder> | |
</Document> | |
</kml> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment