Skyline 7 1. CreateInsatace를 통해 SGWorld 만들기





    
    


    
        <div id="id3DEarthEFO" style="height:100%;width:100%;"/>

        <script>


var SGWorldEFO;

//1. 
function Init3D() {
    var dmap = window.document.getElementById("id3DEarthEFO");
    var obj = C3DWindow();
    
    if (obj) {
        dmap.appendChild(obj);

        obj.BorderStyle = "0";

        setTimeout(function () { LoadFly(); }, 500);
    }
}
//2 .  3D 
function C3DWindow() {
    try {
        var obj = window.document.getElementById("TerraExplorer3DWindowEFO");
        if (obj == null) {
            obj = document.createElement('object');
            obj.name = "TerraExplorer3DWindowEFO";
            obj.id = "TerraExplorer3DWindowEFO";
            obj.style.width = "100%";
            obj.style.height = "100%";
            obj.classid = "CLSID:3a4f9196-65a8-11d5-85c1-0001023952c1";
            obj.style.zIndex = -10000;
            
            obj.innerHTML = "<param value= 'transparent' name='wmode'>";

        }
        return obj;
    }
    catch (e) {
        alert(e.message);
    }
}
//3 .  Fly
function LoadFly() {
    SGWorldEFO = CSGEFOWorld();
    SGWorldEFO.AttachEvent("OnLoadFinished", OnProjectLoadFinished);
    SGWorldEFO.Open(flyurl);

}
function CSGEFOWorld() {
    try {
        return TerraExplorer3DWindowEFO.CreateInstance("TerraExplorerX.SGWorld70");
    }
    catch (e) { alert(e.message); }
}

function OnProjectLoadFinished() {
}

        </script>

    

</code></pre> 
  <p> </p> 
 </div> 
</div>
                            </div>
                        </div>

좋은 웹페이지 즐겨찾기