www.skylinesoft.com Homepage
Forum Home Forum Home > SkylineGlobe General Support > Using SkylineGlobe API
  New Posts New Posts RSS Feed: Flying to wrong location
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

Flying to wrong location

 Post Reply Post Reply
Author
Message
kim View Drop Down
Visitor
Visitor
Avatar

Joined: June 28 2010
Online Status: Offline
Posts: 2
Post Options Post Options   Quote kim Quote  Post ReplyReply Direct Link To This Post Topic: Flying to wrong location
    Posted: June 28 2010 at 2:22am
Hi,
I am very new to the Terra products and using the API.
 
I have created a HTML page using the code provided on the page
 
It runs but flies to the wrong part of the flythru.
 
The flythru works correctly when loading it in TerraExplorer.
What am I doing wrong?
 
Thanks
 
Back to Top
wengel View Drop Down
Skyline Admin Group
Skyline Admin Group
Avatar

Joined: June 08 2007
Location: United States
Online Status: Offline
Posts: 18
Post Options Post Options   Quote wengel Quote  Post ReplyReply Direct Link To This Post Posted: June 29 2010 at 4:53pm
Would you please post the code section related to your fly thru?
Back to Top
kim View Drop Down
Visitor
Visitor
Avatar

Joined: June 28 2010
Online Status: Offline
Posts: 2
Post Options Post Options   Quote kim Quote  Post ReplyReply Direct Link To This Post Posted: June 29 2010 at 10:21pm
The code I have used is exactly the same as the example on the page
 
<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 = "exampleFly.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>
 
Thanks
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down



This page was generated in 0.172 seconds.