<html>
<head>
<title>SGAPI Example</title>
<script type="text/javascript" src="skyline:sgapi.js"></script>
<script type="text/javascript">
var globe;
function Init()
{
try
{
// instantiate SGWorld object
globe = new SGWorld("myWorld");
// attach callback to the load finished event
globe.attachEvent("onLoadFinished", OnLoadFinished);
// Load default developer fly file from www.skylineglobe.com web site.
var fly = "http://www.skylineglobe.com/SkylineGlobe/WebClient/PresentationLayer/WebClient/SkyglobeLB.fly";
globe.teCore.ITerraExplorer.Load(fly);
}
catch(e)
{
alert(e.description);
}
}
function OnLoadFinished()
{
// Fly to the Washington DC when fly is loaded
var Washington = new SGCoord3D(-77.036667, 38.895111, 1500);
globe.navigate.flyTo(Washington);
}
</script>
</head>
<body onload="Init()">
<div id='myWorld' style="width:700px; height:500px;"></div>
</body>
</html>