x
We use cookies to analyze traffic and provide you with better content. By continuing to use our site, you agree to the use of cookie technology. Read more. I agree
Slide background

Developer - Web
(JavaScript/HTML)

Getting started
  • Download and install TerraExplorer Plus.
  • Create a new HTML page.
  • Define an object element that will allow you access to TerraExplorer v6.6 API.
    <object id="SGWorld66" classid="CLSID:3a4f9199-65a8-11d5-85c1-0001023952c1" style="visibility: hidden;height: 0"></object>
  • Define a TerraExplorer ActiveX object.
    <object id="TE" classid="clsid:3a4f9192-65a8-11d5-85c1-0001023952c1" style="width: 600px;height: 600px"></object>
  • Now you can use the SGWorld object to control the TerraExplorer ActiveX component. The following code loads a .fly project and flies to a specific location.
    <html xmlns="https://www.w3.org/1999/xhtml">
    <head>
        <title>HTML Example</title>
        <script type="text/javascript">
            function Init() {
                try {
                    var flyPath = "https://www.skylinesoft.com/SkylineGlobe/WebClient/PresentationLayer/WebClient/SkyglobeLB.fly";
                    // attach callback to the load finished event
                    SGWorld66.AttachEvent("OnLoadFinished", OnProjectLoadFinished);
                    // Load default developer fly file from www.skylinesoft.com web site.
                    // default load is in async mode
                    SGWorld66.Project.Open(flyPath);
                }
                catch (e) {
                    alert("Error: " + e.description);
                }
     
            }
     
            function OnProjectLoadFinished() {
                alert("Received project loaded event. Click OK to fly to Washington DC.");
                var Washington = SGWorld66.Creator.CreatePosition(-77.036667, 38.895111, 1500);
                SGWorld66.Navigate.FlyTo(Washington);
            }
        </script>
    </head>
    <body onload="Init()">
        <object id="TE" classid="clsid:3a4f9192-65a8-11d5-85c1-0001023952c1" style="width: 600px;height: 600px"></object>
        <object id="SGWorld66" classid="CLSID:3a4f9199-65a8-11d5-85c1-0001023952c1" style="visibility: hidden;height: 0"></object>
    </body>
    </html>
  • View the above sample in your browser (IE only). Explore SkylineGlobe's (Any browser) interactive tutorial for more code samples and examples of TerraExplorer’s capabilities.

API
Reference Guide

See complete list of methods
and properties

Download
Center

Developer evaluations
request form